我正在尝试安装web3.js库并获得以下问题。
我能够在这个文件夹下找到python安装。
C:\ Users \用户Mabel.windows建造工具\ python27
C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ node-gyp-bin \ .... \ node_modules \ node-gyp \ bin \ node-gyp.js“rebuild”else(node“C :\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ bin \ node-gyp.js“rebuild)
gyp ERR!配置错误gyp ERR! stack错误:找不到Python可执行文件“python \ path \ to \ executable”,可以设置PYTHON env变量。 gyp ERR!堆栈在PythonFinder.failNoPython(C:\ Program Files \ nodejs \ node_mo dules \ npm \ node_modules \ node-gyp \ lib \ configure.js:483:19)
npm config set python C:\ Python27 \ python.exe
上面的命令解决了这个问题。