本帖最后由 v_jjiazhang 于 2018-7-24 18:48 编辑
您好,我在安装appium的时候遇到了下列问题,安装方法采用的是淘宝镜像安装,报错信息如下,麻烦大神帮帮忙,卡了一周多了,实在解决不了。
node 、AndroidSDK、jdk、python、环境安装都正常的。
安装命令:
npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm install appium@1.7.2 -g
C:\Users\Administrator>cnpm install appium@1.7.2 -g
Downloading appium to C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium_tmp
Copying C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium_tmp\_appium@1.7.2@appium to C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium
Installing appium's dependencies to C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium/node_modules
[1/29] appium-windows-driver@1.x installed at node_modules\_appium-windows-driver@1.2.0@appium-windows-driver
appium-support@2.19.0 › mjpeg-consumer@1.1.0 › buffertools@~2.1.0 found binding.gyp file, auto run "node-gyp rebuild"
C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\_buffertools@2.1.6@buffertools>node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at Object.failNoPython (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack at C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npminstall\\node-gyp-bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\_buffertools@2.1.6@buffertools
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Install fail! Error: Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
Error: Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:74:21)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
npminstall version: 3.10.0
npminstall args: C:\Program Files\nodejs\node.exe C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\Administrator\.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org appium@1.7.2 -g
|