Appium: npm install -g appium on windows : can't find pyton??

Created on 27 Jan 2019  路  3Comments  路  Source: appium/appium

The problem

Run "npm install -g appium" on windows10 ,prompting " Can't find Python executable "C:\python3.7\python.EXE", you can set the PYTHON env variable."

Environment

  • Desktop OS/version used to run Appium: windows 10
  • Node.js version (unless using Appium.app|exe): v8.11.4
  • Npm or Yarn package manager: 5.6.0
  • Python version: 3.7.0

Details

I running npm intsall -g appium on windows CMD,
I tried change python.exe to python.EXE, the problem Still exist.

Link to Appium logs

C:\Users\Kaite>npm install -g appium
npm WARN deprecated [email protected]: Not Ready For Production
C:\Users\Kaite\AppData\Roaming\npm\appium -> C:\Users\Kaite\AppData\Roaming\npmnode_modules\appium\build\lib\main.js

[email protected] install C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-chromedriver
node install-npm.js

[16:01:07] [Chromedriver Install] Installing Chromedriver version '2.44' for platform 'win' and architecture '32'
[16:01:07] [Chromedriver Install] Opening temp file to write 'chromedriver_win32' to...
[16:01:07] [Chromedriver Install] Opened temp file 'C:\Users\Kaite\AppData\Local\Temp\2019027-35876-b41eh2.q33k\chromedriver_win32.zip'
[16:01:07] [Chromedriver Install] Downloading https://chromedriver.storage.googleapis.com/2.44/chromedriver_win32.zip...
[16:01:09] [Chromedriver Install] Writing binary content to C:\Users\Kaite\AppData\Local\Temp\2019027-35876-b41eh2.q33k\chromedriver_win32.zip...
[16:01:09] [Chromedriver Install] Extracting C:\Users\Kaite\AppData\Local\Temp\2019027-35876-b41eh2.q33k\chromedriver_win32.zip to C:\Users\Kaite\AppData\Local\Temp\2019027-35876-b41eh2.q33k\chromedriver_win32
[16:01:09] [Chromedriver Install] Creating C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-chromedriver\chromedriver\win...
[16:01:09] [Chromedriver Install] Copying unzipped binary, reading from C:\Users\Kaite\AppData\Local\Temp\2019027-35876-b41eh2.q33k\chromedriver_win32\chromedriver.exe...
[16:01:09] [Chromedriver Install] Writing to C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-chromedriver\chromedriver\win\chromedriver.exe...
[16:01:09] [Chromedriver Install] C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-chromedriver\chromedriver\win\chromedriver.exe successfully put in place

[email protected] install C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver
node ./bin/install.js

found:10] Java version 1.8.0_181
[16:01:10] Ensuring C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver\selendroid\download exists
[16:01:10] Downloading Selendroid standalone server version 0.17.0 from https://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver\selendroid\download\selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar
[16:03:36] Writing binary content to C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver\selendroid\download\selendroid-server.jar.tmp
[16:03:36] Selendroid standalone server downloaded
[16:03:36] Determining AndroidManifest location
[16:03:37] Determining server apk location
[16:03:37] Extracting manifest and apk to C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver\selendroid\download
[16:03:37] Copying manifest and apk to C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-selendroid-driver\selendroid
[16:03:37] Cleaning up temp files
[16:03:37] Fixing AndroidManifest icon bug

[email protected] install C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\appium-windows-driver
node install-npm.js

info WinAppDriver You must use WinAppDriver version 1.1
info WinAppDriver Verifying WinAppDriver version 1.1 is installed via comparing the checksum.
info WinAppDriver WinAppDriver.exe doesn't exist at the correct version 1.1, setting up
WARNING: You are not running as an administrator so WinAppDriver cannot be installed for you; please reinstall as admin
WinAppDriver was not installed; please check your system and re-run npm install if you need WinAppDriver

[email protected] install C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\heapdump
node-gyp rebuild

C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Program Files\nodejsnode_modules\npmnode_modules\npm-lifecycle\node-gyp-bin\....node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\python3.7\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejsnode_modules\npmnode_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejsnode_modules\npmnode_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
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 C:\Users\Kaite\AppData\Roaming\npmnode_modules\appiumnode_modules\heapdump
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\appiumnode_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\appiumnode_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

C:\Users\Kaite>

C:\Users\Kaite>node -v
v8.11.4

C:\Users\Kaite>python -V
Python 3.7.0

C:\Users\Kaite>npm -v
5.6.0

C:\Users\Kaite>

Node NotABug

Most helpful comment

node-gyp which is nodejs toolchain requires python 2.x.
https://github.com/nodejs/node-gyp

Could you try out with Python 2.x?

All 3 comments

node-gyp which is nodejs toolchain requires python 2.x.
https://github.com/nodejs/node-gyp

Could you try out with Python 2.x?

Thank you help@KazuCocoa ,

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings