Error:Can‘t find Python executable “/path/to/executable/python2.7“, you can set the PYTHON env varia
vue前端项目执行 npm install时报错如下:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
因看node-gyp的安装需求,https://github.com/nodejs/node-gyp, 部分剪切如下,可以请求的看到需要安装python2.7(其实2.6也行)python3不行
You can install with npm
:
npm install -g node-gyp
You will also need to install:
On Unix:python (v2.7 recommended, v3.x.x is not supported)makeA proper C/C++ compiler toolchain, like GCCOn Mac OS X:You also need to install the Command Line Tools via Xcode. You can find this under the menu Xcode -> Preferences -> DownloadsThis step will install gcc and the related toolchain containing makepython (v2.7 recommended, v3.x.x is not supported) (already installed on Mac OS X)XcodeOn Windows:For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDKYou may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK:Microsoft Visual Studio C++ 2013 for Windows Desktop (Express version works well)Microsoft Visual Studio C++ 2013 (Express version works well)If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed firstIf you get errors that the 64-bit compilers are not installed you may also need thecompiler update for the Windows SDK 7.1Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folderPython (v2.7.3 recommended, v3.x.x is not supported)Windows XP/Vista/7:Windows 7/8:All Windows Versionscall "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64
If you have multiple Python versions installed, you can identify which Python version node-gyp
uses by setting the '--python' variable:
node-gyp --python /path/to/python2.7
If node-gyp
is called by way of npm
and you have multiple versions of Python installed, then you can set npm
's 'python' config key to the appropriate value:
npm config set python /path/to/executable/python2.7
Note that OS X is just a flavour of Unix and so needs python
, make
, and C/C++. An easy way to obtain these is to install XCode from Apple, and then use it to install the command line tools (under Preferences -> Downloads).
安装Python环境之后,还需要配置环境变量,不然报错
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable.
1、下载安装Python2.7,设置环境变量 (博主安装Python路径:D:\SoftDevelopmentTools\python2.7.3)
2、执行命令
npm config set python "D:\SoftDevelopmentTools\python2.7.3\python.exe"
3、重新执行
npm install
Error:Can‘t find Python executable “/path/to/executable/python2.7“, you can set the PYTHON env varia相关推荐
- win python ide_Win中同时安装python2和python3及SulimeText3的python IDE搭建
一.下载安装Sublime Text3,初衷是不想忍受pycharm的打开速度,想享受下飞的质感.Sublime Text3的安装已经久远,请自行google. 二.安装python2.7与pytho ...
- 编译Python时报错:configure: error: no acceptable C compiler found in $PATH
报错信息如下: [root@master ~]#./configure --prefix=/usr/local/python3.6 checking build system type... i686 ...
- Linux常见问题三则:Executable Path Is Not Absolute
个人网络日志站点知行空间,欢迎访问! (一)ExecutablePathIsNotAbsolute及Linux内核升级和dist-upgrade 1.systemd-udevd.service启动失败 ...
- Sublime Text3 运行Python 出现Error:Decode error - output not utf-8
问题描述: Sublime Text 3 在build Python时,如果python源代码输出有中文,例如"print('中文')",Sublime Text 会报 [Deco ...
- import导入工程时出现error:Description Resource Path Location Type Target runtime com.genuitec.runtime.gener
Myeclipse把一个workspace里的项目导入另一个workspace时,项目提示error: Description Resource Path Location Type Target r ...
- python或anaconda下安装opencv提示Error:No matching distribution found for opencv
python或anaconda下安装opencv提示Error:No matching distribution found for opencv 错误提示: ERROR: Could not fin ...
- CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH
CentOS上安装软件错误提示:configure: error: no acceptable C compiler found in $PATH 因为是centos linux,默认可以采用yum方 ...
- centos7:glibc:configure: error: no acceptable C compiler found in $PATH
升级glibc2.31出现的问题: configure: error: in `/root/glibc-2.31/build': configure: error: no acceptable C c ...
- Docker报错: Error response from daemon: Mounts denied.The path xxx is not shared from OS X and is not
问题描述:在Mac系统下,尝试让系统根目录下的文件与容器内文件进行映射时报错. 报错:docker: Error response from daemon: Mounts denied: The pa ...
最新文章
- 【Qt】Qt再学习(八):Media Player(Qt实现多媒体播放器)
- Dynamics CRM中跨域调用Web API 2
- Linux进程防杀/防崩溃monitor的实现
- 函数----MoveWindow
- java 高级调试_多种高级debug方法,帮你更快定位问题
- WampServer 3.1.0 所需VC运行库下载及安装说明
- apple tv 开发_如何在Apple TV上播放计算机中的视频文件
- 360浏览器调试html5,360极速浏览器开发:调试指南
- pymol pymol-align两分子或蛋白距离误差计算RMSD;spyrmsd库计算RMSD
- Android app 移动推送遇到的问题(多问题集合)
- 移动端H5页面在线预览Word、Excel、PPT、PDF
- [展览人周刊]华展云20170731期
- 微信应用号 +QQ娱乐社交 腾讯能否独步天下?
- 用VirtualWall防止远古盗链的方法
- ubuntu安装mysql数据库方法
- python3 (学习第一天)
- 5.IP地址介绍及VLSM
- 深度学习NLP领域文本生成总结
- 求职季找工作心得与应聘经验分享(二)
- 机器自动翻译古文拼音 - 宋词 - 寒窑赋