首页 文章

安装gulp-converter-tjs时找不到Python可执行文件

提问于
浏览
1

我尝试安装gulp-converter-tjs时收到以下错误

使用 npm install -g gulp-converter-tjs

看起来我错过了python但是python.exe的路径是正确的 . 我甚至可以从我的cmd运行python命令,并且还设置了环境变量 . 有什么建议?

C:\ Users \ themhz \ AppData \ Roaming \ npm \ node_modules \ gulp-converter-tjs \ node_modules \ iconv>如果未定义npm_config_node_gy p(节点“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!配置错误gyp ERR!堆栈错误:找不到Python可执行文件“C:\ Users \ themhz \ AppData \ Local \ Programs \ Python \ Python36-32 \ python.exe”,可以设置PYTHON env变量 . gyp ERR!堆栈在PythonFinder.failNoPython(C:\ Users \ themhz \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ node-gyp \ lib \ configure.js:483:19)gyp ERR!在PythonFinder堆栈 . (C:\ Users \ themhz \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ node -g yp \ lib \ configure.js:509:16)gyp ERR!堆栈在C:\ Users \ themhz \ AppData \ Roaming \ npm \ node_modules \ npm \ node_modules \ graceful-fs \ polyfills.js:284:29 gyp ERR!堆栈在FSReqWrap.oncomplete(fs.js:152:21)gyp ERR!系统Windows_NT 10.0.15063 gyp ERR!命令“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!不行npm ERR!代码ELIFECYCLE npm ERR!错误1 npm ERR! iconv@2.3.0安装:node-gyp rebuild npm ERR!退出状态1 npm ERR!错误的ERR! iconv@2.3.0安装脚本失败 . 错误的ERR!这可能不是npm的问题 . 上面可能有额外的日志记录输出 . 错误的ERR!可以在以下位置找到此运行的完整日志:npm ERR! C:\ Users \用户themhz \应用程序数据\漫游\ NPM-cache_logs \ 2017-11-25T15_20_09_146Z-的debug.log

我的机器正在运行Windows 10 npm -v 5.5.1 node -v v8.9.1 Python3

2 回答

  • 6

    对于那些将来遇到这个问题的人,你可以节省一些时间,让npm通过运行安装所有必要的程序:

    npm install --global --production windows-build-tools

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

  • -1

    我安装了Python 2.7版本,然后安装了visual studio 2017社区版,以获取c和.net框架库 .

相关问题