notablemind / jupyter-nodejs

A node.js kernel for jupyter/ipython
http://nbviewer.ipython.org/gist/jaredly/404a36306fdee6a1737a
MIT License
682 stars 70 forks source link

Install Instructions for Windows? #45

Open johndeyrup opened 7 years ago

johndeyrup commented 7 years ago

Install instructions don't work on a windows machine.

gdelfino commented 6 years ago

I am trying to install it now under Windows 7. I am stuck at the "npm install":

C:\Users\delfinog\jupyter-nodejs>npm install

> zmq@2.15.3 install C:\Users\delfinog\jupyter-nodejs\node_modules\zmq
> node-gyp rebuild

C:\Users\delfinog\jupyter-nodejs\node_modules\zmq>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\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\delfinog\AppData\Local\Programs\Python\Python36-32\python.exe", you can
 set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483
:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:
16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\n
ode-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\delfinog\jupyter-nodejs\node_modules\zmq
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN rollback Rolling back node-pre-gyp@0.6.39 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\U
sers\delfinog\jupyter-nodejs\node_modules\fsevents\node_modules'
npm WARN The package mkdirp is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current:
 {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.15.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

So it says that it "Can't find Python executable". But it is exactly there where it is looking for it. Defining a PYTHON environment variable as suggested does not help.

mjbright commented 5 years ago

Unable to install on Windows10 either (running the install from a Cygwin shell).

I don't get any Python error as @gdelfino but I get similar OS warnings (presumably not a problem as it says this is an optional dependency) and the "node-gyp rebuild" errors.

It's not at all clear to me from this output where the problem is.

6601 warn The package mkdirp is included as both a dev and production dependency.
6602 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
6603 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
6604 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
6604 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
6604 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
6604 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
6605 verbose stack Error: zmq@2.15.3 install: `node-gyp rebuild`
6605 verbose stack Exit status 1
6605 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
6605 verbose stack     at EventEmitter.emit (events.js:182:13)
6605 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
6605 verbose stack     at ChildProcess.emit (events.js:182:13)
6605 verbose stack     at maybeClose (internal/child_process.js:947:16)
6605 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
6606 verbose pkgid zmq@2.15.3
6607 verbose cwd C:\Users\windo\src\git\notablemind.jupyter-nodejs
6608 verbose Windows_NT 10.0.17713
6609 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
6610 verbose node v10.0.0
6611 verbose npm  v5.6.0
6612 error code ELIFECYCLE
6613 error errno 1
6614 error zmq@2.15.3 install: `node-gyp rebuild`
6614 error Exit status 1
6615 error Failed at the zmq@2.15.3 install script.
6615 error This is probably not a problem with npm. There is likely additional logging output above.
6616 verbose exit [ 1, true ]
rtruxal commented 5 years ago

I'm running into the same problem and haven't been able to fix it. I do think I've isolated the source though: installing zmq via npm on windows.

If I'm right, npm install zmq should fail for both of you, with a similar error message to the one you're getting now.

Wish I had more to contribute...

rtruxal commented 5 years ago

WOW this was frustrating.

First off, @mjbright - downgrade to node v8.11.3 then npm install --global --production windows-build-tools <==this step must be from admin console then npm config set msvs_version <2015|2017|whatever-version-of-visual-studio-you-use> then finally, npm install