56.ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Node.js 在安装模块的时候报错,缺少python环境。
ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
错误信息如下:
|
1
2
3
4
5
6
7
8
9
10
11
12
|
D:\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validate>node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuildERR! configure errorgyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.gyp ERR! stack at failNoPython (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11gyp ERR! stack at Object.oncomplete (fs.js:107:15)gyp ERR! System Windows_NT 6.2.9200gyp ERR! command "node" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"gyp ERR! cwd D:\node_modules\selenium-webdriver\node_modules\ws\node_modules\utf-8-validategyp ERR! node -v v0.10.29gyp ERR! node-gyp -v v0.13.1gyp ERR! not ok |

原因看node-gyp的安装需求,https://github.com/nodejs/node-gyp, 部分剪切如下,可以请求的看到需要安装python2.7(其实2.6也行)python3不行
You can install with
npm:$ npm install -g node-gypYou will also need to install:
On Unix:
python(v2.7recommended,v3.x.xis not supported)
makeA proper C/C++ compiler toolchain, like GCC
On Mac OS X:
You also need to install the
Command Line Toolsvia Xcode. You can find this under the menuXcode -> Preferences -> DownloadsThis step will install
gccand the related toolchain containingmake
python(v2.7recommended,v3.x.xis not supported) (already installed on Mac OS X)On Windows:
For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK
You 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 first
If you get errors that the 64-bit compilers are not installed you may also need thecompiler update for the Windows SDK 7.1
Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder
Windows XP/Vista/7:
Windows 7/8:
All Windows Versions
call "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 /x64If you have multiple Python versions installed, you can identify which Python version
node-gypuses by setting the '--python' variable:$ node-gyp --python /path/to/python2.7If
node-gypis called by way ofnpmand you have multiple versions of Python installed, then you can setnpm's 'python' config key to the appropriate value:$ npm config set python /path/to/executable/python2.7Note 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).
所以下载安装Python2.7就行了,记得配环境变量。
56.ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.的更多相关文章
- 成功解决gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! sta
解决问题 gyp verb ensuring that file exists: C:\Python27\python.exegyp ERR! configure errorgyp ERR! stac ...
- Error: Can't find Python executable, you can set the PYTHON env variable.
该错误解决方案. NodeJS安装Npm包时出现错误: npm WARN prefer global node-gyp@3.4.0 should be installed with -g > s ...
- npm install 报错,提示`gyp ERR! stack Error: EACCES: permission denied` 解决方法
m install 报错,提示gyp ERR! stack Error: EACCES: permission denied 猜测可能是因为没有权限读写,ls -la看下文件权限设置情况 [root@ ...
- Appium 命令行模式下遇到的问题总结及解决方案 npm ERR! tar.unpack unzip(或者untar) error
安装了GUI Appium后,卸载删除问题后,使用命令行模式安装. 一. 遇到问题: nalideMacBook-Pro:~ nali$ npm install -g appium npm ERR! ...
- [Tips]Fix node.js addon build error: "gyp: binding.gyp not found"
基于node-gyp写Node.js native addon的时候,碰到一个很恶心的问题. 调用“node-gyp configure”能成功,再调用“node-gyp”时总会报错,最后发现时系统时 ...
- android stack error message is Fail to start the plugin
E: 08-26 16:34:11.934: E/AliSDK(32236): 错误编码 = 1002208-26 16:34:11.934: E/AliSDK(32236): 错误消息 = SDK ...
- npm install Error:EPROTO: protocol error, symlink '../mime/cli.js' -> '/vagrant/src/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime'
我在ubuntu上使用npm安装依赖是出现下面错误: npm ERR! Linux 3.13.0-101-genericnpm ERR! argv "/usr/bin/nodejs" ...
- Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}出错的解决方案
错误描述: docker logs web 现象: > blockchain-for-insurance@2.1.0 serve /app > cross-env NODE_ENV=pro ...
- 解决MyEclipe出现An error has occurred,See error log for more details的错误
今晚在卸载MyEclipse时出现An error has occurred,See error log for more details的错误,打开相应路径下的文件查看得如下: !SESSION 2 ...
随机推荐
- BZOJ 1379 模拟退火
模拟退火的第一题~ //By SiriusRen #include <cmath> #include <cstdio> #include <algorithm> u ...
- Svn中的tag标签的用法和意义
使用场景: 假如你的项目的某个版本已经完成测试开发.测试并已经上线,接下来街道新的需求,新项目开发需要修改多个文件的代码,当需求已经开发一段时间的时候,突然接到用户和测试人员的反馈,项目中某个重大的b ...
- poj2823/hdu3415 - 数据结构 单调队列
poj2823 题目链接 长度为N的数组,求宽度k的滑动窗口在数组上滑动时窗口内的最大值或最小值 如果用单调队列做,求最小值时,队列应该严格递增的.所以插入时,队尾大于等于插入值的元素都应被舍弃,因为 ...
- c# 静态成员和实例成员的区别
静态成员也称为共享成员,例如静态属性 静态字段 静态方法:静态成员可以在类的实例之间共享. 静态类中只能有静态成员,不能有实例成员,因为静态类不能进行实例化: 在非静态类中 即可以有静态成员 也可以有 ...
- salt的grains
grains作用: 1.匹配 minion 2.收集信息 (每次重启minion才会收集) grains 数据存储在minion端. salt '*' grains.ls salt '*' grain ...
- 【Git 二】Windows|Mac 安装 Git
Windows 或 Mac 上安装 Git 相对于 Linux 上安装来说步骤是简便一些的.Linux 安装步骤见:[Git 一]Linux安装Git 一.Windows 安装 Git 直接下载对应 ...
- kubernetes学习与实践篇(一)主要概念介绍
什么是kubernetes Kubernetes是Google开源的容器集群管理系统,实现基于Docker构建容器,利用Kubernetes能很方面管理多台Docker主机中的容器. 主要功能 将多台 ...
- ES6学习4 变量的解构赋值
变量的解构赋值 一.数组结构赋值 1.数组结构赋值 let [a, b, c] = [1, 2, 3]; ES6 可以从数组中提取值,按照对应位置,对变量赋值. 1) 本质上,这种写法属于“模式匹配 ...
- win10如何设置开机自动启动热点WIFI?
1.编写脚本文件(先新建txt文件,编写代码内容netsh wlan start hostednetwork,最后重命名成HotSpot.bat):文件名称:HotSpot.bat,代码内容: net ...
- Linux Network配置
/etc/sysconfig/network [root@mytest ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=mytest /e ...