n-riesco / ijavascript

IJavascript is a javascript kernel for the Jupyter notebook
Other
2.18k stars 187 forks source link

I can't install the 'npm install -g ijavascript' #201

Closed joao-fb closed 5 years ago

joao-fb commented 5 years ago

I think I have followed all instructions as they asked, but the terminal keeps giving me this error. my input: npm install -g ijavascript gyp ERR! configure error gyp ERR! stack Error: Command failed: /anaconda3/bin/python -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:289:12) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:381:11) gyp ERR! stack at Socket.emit (events.js:182:13) gyp ERR! stack at Pipe._handle.close (net.js:606:12) gyp ERR! System Darwin 18.6.0 gyp ERR! command "/anaconda3/bin/node" "/anaconda3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /anaconda3/lib/node_modules/ijavascript/node_modules/zeromq gyp ERR! node -v v10.13.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! /Users/joao.fb/.npm/_logs/2019-07-10T21_12_01_226Z-debug.log

how can I solve it?

n-riesco commented 5 years ago

Please, see #182.

shytikov commented 5 years ago

This is very annoying bug, especially for these who don't have that flexibility in their actions in given environment.

So I did some digging and it looks, like it's possible to fix nicely, at least in theory.

First of all, this issue comes from specific version of zeromq, namely 4.6.0 which is prerequisite for jmp package, which in it's turn prerequisite for jp-kernel, which already direct dependency for ijavascript.

And you can verify that by trying to run npm install zeromq@4.6.0 — it will try to build ØMQ stuff and will fail.

But if you will try to install latest version of zeromq package, which I believe 5.1.0 you won't see any build errors. So upgrading to ØMQ should fix the situation...

But... What if we cannot upgrade because of any reason? I started digging for that reason, and it seems to be there are none. @n-riesco already released jmp@2.0.0 which is dependent on zeromq@5.1.0.

The bad news comes from jp-kernel it's still refers jmp of version 1.

So upgrading jp-kernel dependencies should lift new version of ØMQ which will not require any build actions.

@n-riesco can you check if I'm wrong here? I'm probably oversimplifying somewhere or missing important piece of the puzzle...

n-riesco commented 5 years ago

I'm going to close this issue, as I haven't heard back from @joao-fb .