npm安装创建障碍获取python环境错误

olhwl3o2  于 2023-04-21  发布在  Python
关注(0)|答案(1)|浏览(175)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Programs\Python2.7\python2.7.exe", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\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:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd G:\project\kanwat infotech\new project\node_modules\scrypt
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN new project No description
npm WARN new project No repository field.
npm WARN new project No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 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\Sandeep\AppData\Roaming\npm-cache\_logs\2018-05-07T19_54_26_289Z-debug.log

我在安装web3包时遇到了这个错误。

vaj7vani

vaj7vani1#

从错误消息的外观来看,您没有安装python或者PYTHON env被设置到错误的位置。
错误:找不到Python可执行文件“C:\Programs\Python2.7\python2.7.exe”,可以设置PYTHON env变量
检查下面的命令是否工作,如果不工作,请安装pythong。

python --version

相关问题