2017-06-08 102 views
0

在Windows上,当我尝试安装wdio时,我有一个python错误: 但安装了python并在路径中。 PYTHON变量设置为“C:\ Program Files \ Python36 \ python.exe”,这是一个正确的路径。 我不知道错误来自哪里,因为它说它可以找到可执行文件,位显示可执行文件的正确路径。在npm软件包安装Windows上的python错误

PS C:\Users\admin> npm install wdio 

> [email protected] install C:\Users\admin\node_modules\fibers 
> node build.js || nodejs build.js 


C:\Users\admin\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release) else (node "" rebuild --release) 
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python36\python.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" "--release" 
gyp ERR! cwd C:\Users\admin\node_modules\fibers 
gyp ERR! node -v v8.0.0 
gyp ERR! node-gyp -v v3.6.1 
gyp ERR! not ok 
node-gyp exited with code: 1 
Please make sure you are using a supported platform and node version. If you 
would like to compile fibers on this machine please make sure you have setup your 
build environment-- 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\admin\package.json' 

回答