Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running npm install -g appium #1528

Closed
hemanthaSN opened this issue Aug 16, 2018 · 6 comments
Closed

Error while running npm install -g appium #1528

hemanthaSN opened this issue Aug 16, 2018 · 6 comments

Comments

@hemanthaSN
Copy link

While installing Appium am getting the following error.

command :npm install -g appium

C:\Users\BinduHemu>npm install -g appium
C:\Users\BinduHemu\AppData\Roaming\npm\appium -> C:\Users\BinduHemu\AppData\Roam
ing\npm\node_modules\appium\build\lib\main.js

heapdump@0.3.9 install C:\Users\BinduHemu\AppData\Roaming\npm\node_modules\app
ium\node_modules\heapdump
node-gyp rebuild

C:\Users\BinduHemu\AppData\Roaming\npm\node_modules\appium\node_modules\heapdump

if not defined npm_config_node_gyp (node "C:\Users\BinduHemu\AppData\Roaming\np
m\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\n
ode-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\BinduHemu\AppData\Roami
ng\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\BinduHemu\AppData\Local\Programs
Python\Python36-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info
[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)

gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:557:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\Nodejs\node.exe" "C:\Users\BinduHemu\Ap
pData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
" "rebuild"
gyp ERR! cwd C:\Users\BinduHemu\AppData\Roaming\npm\node_modules\appium\node_mod
ules\heapdump
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\app
ium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 (node_modules\app
ium\node_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 install: node-gy p rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • appium@1.8.1
    updated 1 package in 129.495s

Command: appium

C:\Users\BinduHemu>appium
'appium' is not recognized as an internal or external command,
operable program or batch file.

Please help me on this

@bzoz
Copy link
Contributor

bzoz commented Aug 16, 2018

You need Python 2.x.

Using 3.x is not supported.

@hemanthaSN
Copy link
Author

Thank you so much. It worked using python 2.x.

@parmentelat
Copy link

parmentelat commented Mar 11, 2019

you guys do realise that python2 will be end-fo-lived in less than a year now, after having been kept on artificial respiration for 5 years, right ?
don't you think it would be better to rely on python3 now ?

@parmentelat
Copy link

I realise this might be a long shot, but if that's an option, I'd suggest you at the very least use some band-aid to get this to work on both flavours:

$ python2 -c 'from future import print_function; import sys; print(sys.version_info[:3])'
(2, 7, 15)
$ python3 -c 'from future import print_function; import sys; print(sys.version_info[:3])'
(3, 7, 2)

@bzoz
Copy link
Contributor

bzoz commented Mar 11, 2019

@parmentelat There is ongoing effort to make this happen, see nodejs/node#25789. PRs are always welcomed.

@thefourtheye
Copy link
Contributor

Closing this as the problem was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants