try*_*sis 6 python python-2.x node.js python-3.x npm
每当我安装某些node软件包时,都会出现涉及该Python版本的错误.这是因为我都Python 2.7和Python 3.3(这些是我更新了最新版本的最后一次,但现在有3.4),但很明显,我只能源我一个版本PATH(以后的任何文件夹都将被覆盖).我有Python 3.3我的,PATH因为它更新,但仍然有这么多程序,包括npm模块,使用Python 2,超过5年后.
Python对于无法使用版本3的模块,是否有任何方法可以包含"后备" 版本?一般的解决方案会很棒,但我至少会喜欢安装npm模块时的解决方案.请记住,有些模块可能完全Python 3没问题,但我不确定是否有任何模块无法使用Python 2.话虽如此,一个解决方案允许使用兼容时的最新版本和不使用时的旧版本,这将是最好的.
作为参考,我Python 2.7安装在C:\Python27\python文件夹Python 3.3中,位于C:\Python33\python文件夹中.npm我得到的错误是:
contextify@0.1.8安装c:\ repos\konneka \node_modules\buster \node_modules\bus ter-syntax \node_modules\jsdom \node_modules\contextify node-gyp rebuild
|
c:\repos\konneka\node_modules\buster\node_modules\buster-syntax\node_modules\jsd
om\node_modules\contextify>node "c:\Program Files\nodejs\node_modules\npm\bin\no
de-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
when@1.3.0 node_modules\buster\node_modules\buster-server-cli\node_modules\buste
r-cli\node_modules\buster-configuration\node_modules\when
lodash@0.5.2 node_modules\buster\node_modules\buster-test-cli\node_modules\ramp\
node_modules\ramp-resources\node_modules\lodash
gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v3.3.2, which is not support
ed 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 (c:\Program Files\nodejs\node_modules\np
m\node_modules\node-gyp\lib\configure.js:108:14)
gyp ERR! stack at c:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:97:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:645:7)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at maybeClose (child_process.js:755:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:822:
5)
ERR! System Windows_NT 6.2.9200
command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\nod
e-gyp\\bin\\node-gyp.js" "rebuild"
esprima-fb@3001.1.0-dev-harmony-fb node_modules\browserify\node_modules\syntax-e
rror\node_modules\esprima-fb
http-proxy@0.10.4 node_modules\karma\node_modules\http-proxy
??? pkginfo@0.3.0
??? utile@0.2.1 (deep-equal@0.2.1, async@0.2.10, ncp@0.4.2, i@0.3.2, mkdirp@0.5.
0)
cwd c:\repos\konneka\node_modules\buster\node_modules\buster-syntax\node_module
s\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2300 次 |
| 最近记录: |