Tag: python 2.x

npm使用2个版本的Python

每当我安装某些node包时,就会出现涉及Python版本的错误。 这是因为我有Python 2.7和Python 3.3 (这些是我上次更新的最新版本,但现在有3.4 ),但显然我只能在我的PATH (任何后来的文件夹被重写)源只有一个版本。 我的PATH有Python 3.3 ,因为它比较新,但是在5年之后,仍然有很多程序,包括使用Python 2 npm模块。 有什么办法可以包含一个“fallback” Python版本,对于那些不能使用版本3的模块呢? 一般的解决scheme将是惊人的,但我至less会喜欢安装npm模块的解决scheme。 请记住,有些模块对于Python 3可能是完美的,但我不确定是否有任何不能使用Python 2 。 有了这个说法,一个解决scheme,允许使用最新的版本,当兼容和一些旧版本时,不是最好的。 作为参考,我的Python 2.7安装在C:\Python27\python文件夹中, Python 3.3安装在C:\Python27\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 […]