Comments (20)
In the evening, I will try to set up IJavascript on a Windows machine and reproduce this bug.
In the meantime, please, could you post here the output of running:
$ node "C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js"
?
from ijavascript.
Thanks for the quick response.
$ node "C:\Program Files
(x86)\nodejs\node_modules\ijavascript\lib\kernel.js"
Usage: node kernel.js [--debug] session_working_directory
connection_file
C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:79
throw e;
^
Error: Error: missing session_working_directory
at Object.<anonymous> (C:\Program Files
(x86)\nodejs\node_modules\ijavascript\lib\kernel.js:66:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
from ijavascript.
It looks like you can run the IJavascript kernel from the command line, but not from IPython. I will investigate this further, once I setup IJavascript on a Windows machine.
from ijavascript.
Hi! I couldn't reproduce the same error message, but I found a bug building the path to the kernel folder. I've just released version 5.0.1 that fixes this bug. Please, could you install IJavascript again and check whether this release fixes the issue for you?
from ijavascript.
I just did a
$ npm install ijavascript
$ ijs
I am getting the same issue as before:
Error: Cannot find module 'C:\Program Files (x86)
odejs
ode_modules\ijavascript\lib\kernel.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
[W 05:55:14.108 NotebookApp] Timeout waiting for kernel_info reply from 6e44ac95-789b-4636-a3ee-797035bbffb6
[I 05:55:15.936 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 6e44ac95-789b-4636-a3ee-797035bbffb6 restarted
module.js:338
throw err;
Running outside of ijs
, I get
$ node "C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js"
Usage: node kernel.js [--debug] session_working_directory connection_file
C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:79
throw e;
^
Error: Error: missing session_working_directory
at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\ijavascript\lib\kernel.js:66:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
from ijavascript.
The install command is missing -g
. Please, try:
$ npm install -g ijavascript
And to confirm that version 5.0.1 is globally installed, try:
$ npm list -g ijavascript
It should show version 5.0.1
from ijavascript.
As indicated above, I did install
ijavascript, though not globally.
I just used the exact commands you listed above and confirmed that I am indeed using v5.0.1.
Unfortunately, the problem persists.
The following line in the console output is very odd:
Error: Cannot find module 'C:\Program Files (x86)
odejs
ode_modules\ijavascript\lib\kernel.js'
It looks like the path is not being interpreted correctly. As I mentioned initially, could this be a quoting issue?
from ijavascript.
Oh! So the path is actually printed out broken like that?
Could you check for me if the path in the kernel spec file is also broken?
If you run:
$ ipython locate
It should print the IPython folder. Let's say it prints "C:\Users\breisfeld.ipython". Then, the kernel spec should be located in "C:\Users\breisfeld.ipython\kernels\javascript\kernel.json".
from ijavascript.
This does appear to be broken.
My ipython preferences directory is something like
"C:\Users\USERNAME\AppData\Roaming.ipython"
Within this directory, I do have a "kernels" subdirectory. It contains other kernels I have installed (e.g., julia), but not one for javascript.
I can't find any "...\javascript\kernel.json" on my machine.
from ijavascript.
Just to be clear, when you run ipython locate
, what you get is "C:\Users\USERNAME\AppData\Roaming.ipython", isn't it?
from ijavascript.
And one more question: I've noticed you're using IPython 3.1.0, whereas Anaconda 2.1.0 provides IPython 2.2.0. How did you upgrade IPython?
from ijavascript.
$ ipython locate
C:\Users\USERNAME\AppData\Roaming\.ipython
To update ipython, I believe that I downloaded the wheel from Christoph Gohlke's "Unofficial Windows Binaries for Python Extension Packages" site (http://www.lfd.uci.edu/~gohlke/pythonlibs/) and installed that using
pip install ipython‑3.1.0‑py27‑none‑any.whl
from ijavascript.
And when you run ipython --version
from the terminal, what do you get 3.1.0 or 2.2.0?
from ijavascript.
$ ipython --version
3.1.0
from ijavascript.
I've just updated IJavascript (v5.0.2). Please, could you install IJavascript again, run the following command and post the output here:
$ ijs --ijs-debug --ijs-install-kernel
?
I hope it'll give me a clue to locate the bug.
from ijavascript.
$ ijs --ijs-debug --ijs-install-kernel
Error: Unrecognised flag '--ijs-install-kernel'
iJavascript Notebook
Usage:
ijs <options>
The recognised options are:
--ijs-debug enable debug log level
--ijs-help show this help
--ijs-working-dir=path set working directory for Javascript sessions
(default = current working directory)
and any other options recognised by the IPython notebook; run:
ipython notebook --help
for a full list.
from ijavascript.
That output indicates that the IJavascript in your system is version v5.0.0 or earlier.
The easiest way to run IJavascript is when IJavascript has been installed globally:
$ npm install -g ijavascript
$ ijs --ijs-debug --ijs-install-kernel
If you want to install it locally, then running IJavascript requires to include the right path to the local installation:
$ npm install ijavascript
[email protected] ../node_modules/ijavascript
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected])
$ ../node_modules/.bin/ijs --ijs-debug --ijs-install-kernel
from ijavascript.
Okay. I think I have this working.
I ended up removing my previous ijavascript installations (I had a global and local one) and installed the latest version globally via npm.
Thank you for your help!
from ijavascript.
Does the latest version work for you? Shall I close this bug?
from ijavascript.
Yes and yes.
from ijavascript.
Related Issues (20)
- Install ijavascript in Windows without Visual Studio HOT 9
- Give a documented dependency install on Linux (ubuntu) HOT 13
- Can't output separate charts HOT 9
- [requirejs] Unable to load library with Jupyter Notebook HOT 5
- Thoughts on how to run iJavaScript on mybinder? HOT 4
- No output when using %%javascript magic HOT 2
- Unable to run in Ubuntu WSL2 Visual Studio Code (`spawn ijskernel ENOENT`) HOT 2
- import / require statements break vscode code analysis HOT 2
- IJavaScript stopped working after upgrading the major version of node.js HOT 2
- Jupyter notebook (and Jupyter lab too) gives error when loading d3 library HOT 2
- Updated NVM version, got error "no such file or directory" ".../bin/node" HOT 2
- Add a rebuild command
- jupyterlite Support
- Java script kernel stops working in Jupyter Lab HOT 3
- Is it still maintained HOT 4
- Cant install ijavascript (npm ERR! enoent spawn C:\Windows\system32\cmd.exe ENOENT) HOT 2
- ijsinstall: not working due to wrong use of ipython --user HOT 5
- SyntaxError: Cannot use import statement outside a module HOT 2
- install failed due to zeromq (Node v21) HOT 1
- npm install fails on macos Sonoma 14.4.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ijavascript.