找不到Python可执行文件"/path/to/executable/python2.7",您可以设置PYTHON env变量 [英] Can't find Python executable "/path/to/executable/python2.7", you can set the PYTHON env variable
问题描述
bufferutil@1.2.1安装/home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil> node-gyp重建gyp ERR!配置错误gyp ERR!堆栈错误:找不到Python可执行文件"/path/to/executable/python2.7",您可以设置PYTHON env变量.糟糕!堆叠在failNoPython(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14)gyp ERR!堆栈在/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR!堆栈在F(/usr/lib/node_modules/npm/node_modules/that/which.js:78:16)gyp ERR!堆栈在E(/usr/lib/node_modules/npm/node_modules/which/which.js:82:29)gyp ERR!堆栈在/usr/lib/node_modules/npm/node_modules/which/which.js:93:16 gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:82:15)gyp ERR!系统Linux 3.13.0-74-通用gyp错误!命令"/usr/bin/nodejs""/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"重建" gyp ERR! cwd/home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil gyp错误!节点-v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp错误!不正确npm WARN安装:bufferutil@1.2.1 bufferutil@1.2.1安装:
node-gyp rebuild
npm WARN安装:bufferutil@1.2.1退出状态1> utf-8-validate@1.2.1 install/home/sudthenerd/polymer -starter-kit-1.2.1/node_modules/utf-8-validate> node-gyp重建gyp ERR!配置错误gyp ERR!堆栈错误:找不到Python可执行文件"/path/to/executable/python2.7",您可以设置PYTHON env变量.糟糕!堆叠在failNoPython(/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14)gyp ERR!堆栈在/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR!堆栈在F(/usr/lib/node_modules/npm/node_modules/that/which.js:78:16)gyp ERR!堆栈在E(/usr/lib/node_modules/npm/node_modules/which/which.js:82:29)gyp ERR!堆栈在/usr/lib/node_modules/npm/node_modules/which/which.js:93:16 gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:82:15)gyp ERR!系统Linux 3.13.0-74-通用gyp错误!命令"/usr/bin/nodejs""/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"重建" gyp ERR! cwd/home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/utf-8-validate gyp ERR!节点-v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp错误!不正确npm WARN安装:utf-8-validate@1.2.1 utf-8-validate@1.2.1安装:node-gyp rebuild
npm WARN安装:utf-8-validate@1.2.1退出状态1
bufferutil@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil > node-gyp rebuild 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. gyp ERR! stack at failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:78:16) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:82:29) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:93:16 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Linux 3.13.0-74-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/bufferutil gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install:
node-gyp rebuild
npm WARN install:bufferutil@1.2.1 Exit status 1 > utf-8-validate@1.2.1 install /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/utf-8-validate > node-gyp rebuild 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. gyp ERR! stack at failNoPython (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:401:14) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:330:11 gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:78:16) gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:82:29) gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:93:16 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Linux 3.13.0-74-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/sudthenerd/polymer-starter-kit-1.2.1/node_modules/utf-8-validate gyp ERR! node -v v5.3.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install:node-gyp rebuild
npm WARN install:utf-8-validate@1.2.1 Exit status 1
推荐答案
Scott Frees的解决方案对我不起作用,但正在运行
Scott Frees' solution didn't work for me but running
npm config set python $(which python)
没有.
这篇关于找不到Python可执行文件"/path/to/executable/python2.7",您可以设置PYTHON env变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!