安装gulpconvertertjs时找不到Python可执行文件

2024-10-06 13:12:12 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图安装gulpconverter tjs时,我得到了以下错误

使用npm安装-g gulp converter tjs

看起来我缺少python,但是路径是正确的python.exe. 我甚至可以从命令中运行python命令,并且设置环境变量。 有什么建议吗?在

C:\Users\themhz\AppData\Roaming\npm\node_modules\gulp-converter-tjs\node_modules\iconv>if not defined npm_config_node_gy p (node "C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp .js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "C:\Users\themhz\AppData\Local\Programs\Python\Python36-32\python.exe ", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\node_modules\node- gyp\lib\configure.js:483:19) gyp ERR! stack at PythonFinder. (C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\node_modules\node-g yp\lib\configure.js:509:16) gyp ERR! stack at C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\themhz\AppData\Roaming\npm\node_modules\npm\nod e_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\themhz\AppData\Roaming\npm\node_modules\gulp-converter-tjs\node_modules\iconv gyp ERR! node -v v8.9.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! iconv@2.3.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the iconv@2.3.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\themhz\AppData\Roaming\npm-cache_logs\2017-11-25T15_20_09_146Z-debug.log

我的机器在运转 windows 10 npm-第5.5.1节 节点-v v8.9.1 Python3


Tags: modulesnodenpmbinstackjsroamingusers
2条回答

我安装了python2.7版本,然后安装了visualstudio2017社区版,以便获得c++和.netframework库。在

对于将来遇到此问题的用户,您可以节省一些时间,让npm安装所有必要的程序,方法是运行:

npm install global production windows-build-tools

注意:您需要以管理员身份运行此命令

相关问题 更多 >