首页 > 代码库 > npm install 时遇到的 python 问题
npm install 时遇到的 python 问题
gyp ERR! configure error gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.gyp ERR! stack at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:125:14)gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:114:9
解决,安装多个版本的python
设定一个符合的一个版本
You can use --python
option to npm like so:
npm install --python=python2.7
or set it to be used always:
npm config set python python2.7
Npm will in turn pass this option to node-gyp when needed.
(note: I‘m the one who opened an issue on Github to have this included in the docs, as there were so many questions about it ;-) )
npm install 时遇到的 python 问题
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。