fyears / electron-python-example

Electron as GUI of Python Applications
MIT License
2.04k stars 232 forks source link

npm install fails #32

Open thisisashukla opened 5 years ago

thisisashukla commented 5 years ago

Hi. I am trying to install the repo on my system with Windows 10. Python 3.5 and Nodejs 10.16.0. When i run npm install i get the following error

`path\electron-python-example-master\electron-python-example-master>npm install

zeromq@4.6.0 install path\electron-python-example-master\electron-python-example-master\node_modules\zeromq node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)

prebuild-install WARN install No prebuilt binaries found (target=10.16.0 runtime=node arch=x64 platform=win32)

Downloading libzmq for Windows Download finished

path\electron-python-example-master\electron-python-example-master\node_modules\zeromq>if not defined npm_config_node_gyp (node "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! configure error gyp ERR! stack Error: Command failed: path\AppData\Local\Programs\Python\Python35\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:294:12) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at maybeClose (internal/child_process.js:982:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) gyp ERR! System Windows_NT 10.0.16299 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 path\electron-python-example-master\electron-python-example-master\node_modules\zeromq gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! zeromq@4.6.0 install: node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild) npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the zeromq@4.6.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! path\AppData\Roaming\npm-cache_logs\2019-06-07T06_09_01_680Z-debug.log`

Is this repo not compatible with Python 3.5?

rils commented 5 years ago

This is because you have python3. You need python2.7 for building libzmpq. See error. gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; If yo have both python3 and python2 add python2 to your path first. I have also searched for the python3 support of libzmq. couldnt find a answer. :(