n-riesco / ijavascript

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

How to install IJavascript on Windows with zeromq.js compiled from source #181

Open n-riesco opened 5 years ago

n-riesco commented 5 years ago

Taken from https://github.com/n-riesco/ijavascript/issues/177#issuecomment-451985453


installation on win10 won't work since the rebuild of node-gyp.js still using python 2.7 syntax.

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: C:\Python37\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

n-riesco commented 5 years ago

I'll be looking into this question so that I can debug #180 . I'll use this issue to document the steps to setup windows and install IJavacript with zeromq.js compiled from source.

Wismin-Effendi commented 5 years ago

I've successfully install ijavascript on jupyter notebook. First I have to build zeromq from source using cmake + VS 2017.

Briefly: (1) Re-run Visual Studio 2017 Community edition installer, make sure to include/add C++ distribution. (2) Install cmake using choco as:
choco install cmake (chocolatey is available at chocolatey.org) (3) clone the zeromq git to a source directory. ( as per http://zeromq.org/build:_start) git clone https://github.com/zeromq/libzmq.git (4) Run cmake-gui ; specify the source of zeromq and destination output. File -> Delete cache (from the File menu). then click configure, select Visual Studio 15 2017 Win 64. Click finish to close the button. ( if make mistake in selection, perform Delete Cache again and redo the action). (5) On cmake-gui, click generate. wait until finish. (6) Open the solution file (.sln) in Visual Studio 2017 Community Edition. Build Solution as Release version (default is Debug, change it to Release). (7) Copy the resulted bin/ directory to your user/bin or other directory that is in the PATH so Windows could find the dll and exe files. (8). Open Powershell as Administrator and run npm install -g ijavascript (9). Run ijsinstall

Everything will be installed successfully.

~ Wismin Effendi

cuiyanbo2019 commented 5 years ago

thank you

jnareb commented 5 years ago

What is strange that installing zeromq with conda install zeromq does not help.