Closed josephtan closed 6 years ago
The way I'm reading the error message is that jupyter-kernelspec
is missing (or most likely not in your %PATH%).
I'd guess that Anaconda has been installed without updating %PATH% and for that reason it isn't available to other programs in your computer.
I can see that Anaconda doesn't recommend to update your %PATH%.
I've tested the installation instruction here still work for me:
conda install nodejs
npm install -g ijavascript
ijsinstall
New > Javascript (Node.js)
@n-riesco Actually when typing down jupyter-kernelspec
the cmd terminal list out the subcommand list.
What the 'ijs' command trying to execute is jupyter kernelspec
without the hyphen so is there anyway to change the executable?
The same goes for jupyter-notebook
rather the default jupyter notebook
.
@josephtan See my updated comment above.
Did you run ijs
from within the Anaconda prompt?
One more thing, I really recommend to install IJavascript's kernelspec with ijsinstall
(which by default hides undefined execution results). ijs
is only kept for backwards-compatibility.
I did the steps from 1-3 but when it comes to step 4 I'm getting the same error.
(D:\Anaconda) C:\Users\JosephTan>ijsinstall Error running
jupyter kernelspec install --replace C:\Users\JosephTan\AppData\Local\Temp\1a28c89e86be5956261c7b949764942d\javascript --user
Error: Command failed: jupyter kernelspec install --replace C:\Users\JosephTan\AppData\Local\Temp\1a28c89e86be5956261c7b949764942d\javascript --user Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2 Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2
What version of Anaconda are you using? I've tested Anaconda3-5.0.1-Windows-x86_64.exe and the instructions work.
In the past both Jupyter and Anaconda have had issues with linking to jupyter-kernelspec
, but they have been fixed in their latest versions.
Here's a link to the instructions to upgrade jupyter: http://jupyter.readthedocs.io/en/latest/projects/upgrade-notebook.html#upgrading-jupyter-notebook-using-anaconda
version 4.3.30 as per conda command.
Could you check if ijsinstall
works for this version?
Yes, it is the Anaconda3 5.0.1-Windows-x86_64.exe as downloaded on the website.
I've also got 4.3.30. When you open the Anaconda Navigator, what version of Jupyter do you see?
So if we both have the same version, my guess is that you also have a second installation of Jupyter.
What do you get when you run where jupyter
and where jupyter-kernelspec
inside the Anaconda Prompt and inside Power Shell?
From the Anaconda prompt I get:
(C:\Users\User\Anaconda3) C:\Users\User>where jupyter
C:\Users\User\Anaconda3\Scripts\jupyter.exe
(C:\Users\User\Anaconda3) C:\Users\User>where jupyter-kernelspec
C:\Users\User\Anaconda3\Scripts\jupyter-kernelspec.exe
But from Power Shell I get nothing:
PS C:\Users\User> where jupyter
PS C:\Users\User> where jupyter-kernelspec
PS C:\Users\User>
Jupyter version after update:
(D:\Anaconda)C:\Users\JosephTan>jupyter --version 4.3.0
Anaconda prompt:
(D:\Anaconda) C:\Users\JosephTan>where jupyter D:\Anaconda\Scripts\jupyter.exe (D:\Anaconda) C:\Users\JosephTan>where jupyter-kernelspec D:\Anaconda\Scripts\jupyter-kernelspec.exe
Nothing in power shell either:
PS C:\Users\JosephTan> where jupyter PS C:\Users\JosephTan> where jupyter-kernel
That all looks like on my setup. Does ijsinstall
work now in the Anaconda Prompt?
Nope, is throwing up the same error.
(D:\Anaconda) C:\Users\JosephTan>ijsinstall
Error running
jupyter kernelspec install --replace`
C:\Users\JosephTan\AppData\Local\Temp\cc527cc71a71476f3fbabb78e1c8bcce\javascript --user
Error: Command failed: jupyter kernelspec install --replace
C:\Users\JosephTan\AppData\Local\Temp\cc527cc71a71476f3fbabb78e1c8bcce\javascript --user
Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2
Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2
did you use conda to install nodejs?
Yes and its all through the Anaconda prompt.
However conda list
returns nodejs with 0 on it?
nltk 3.2.4 py36hd0e0a39_0
nodejs 6.10.3 0
nose 1.3.7 py36h1c3779e_2
notebook 5.0.0 py36hd9fbf6f_2
All that looks OK. I can't think of anything else that explains what you see.
If you want to, we can try to install the kernel spec manually:
First you need to create a folder named javascript
:
(C:\Users\User\Anaconda3) C:\Users\User>mkdir javascript
Inside the javascript
folder, you need to:
kernel.json
with the contents shown below,(C:\Users\User\Anaconda3) C:\Users\User>copy C:\Users\User\Anaconda3\Library\bin\node_modules\ijavascript\images\logo-32x32.png javascript
1 file(s) copied.
(C:\Users\User\Anaconda3) C:\Users\User>copy C:\Users\User\Anaconda3\Library\bin\node_modules\ijavascript\images\logo-64x64.png javascript
1 file(s) copied.
(C:\Users\User\Anaconda3) C:\Users\User>type javascript\kernel.json
{
"argv": [
"ijskernel.cmd",
"{connection_file}",
"--protocol=5.0"
],
"display_name": "Javascript (Node.js)",
"language": "javascript"
}
(C:\Users\User\Anaconda3) C:\Users\User>dir javascript
Volume in drive C has no label.
Volume Serial Number is 02B4-3556
Directory of C:\Users\User\javascript
11/28/2017 03:48 AM <DIR> .
11/28/2017 03:48 AM <DIR> ..
11/28/2017 03:42 AM 237 kernel.json
11/28/2017 02:02 AM 1,239 logo-32x32.png
11/28/2017 02:02 AM 2,738 logo-64x64.png
3 File(s) 4,214 bytes
2 Dir(s) 92,847,783,936 bytes free
(C:\Users\User\Anaconda3) C:\Users\User>
Once you're done with the javascript
folder, the command to register the javascript
folder as a kernelspec is:
(C:\Users\User\Anaconda3) C:\Users\User>jupyter kernelspec install --replace javascript --user
[InstallKernelSpec] Removing existing kernelspec in C:\Users\User\AppData\Roaming\jupyter\kernels\javascript
[InstallKernelSpec] Installed kernelspec javascript in C:\Users\User\AppData\Roaming\jupyter\kernels\javascript
And to confirm a javascript kernel spec has been registered:
(C:\Users\User\Anaconda3) C:\Users\User>jupyter kernelspec list --json
{
"kernelspecs": {
"javascript": {
"resource_dir": "C:\\Users\\User\\AppData\\Roaming\\jupyter\\kernels\\javascript",
"spec": {
"argv": [
"ijskernel.cmd",
"{connection_file}",
"--protocol=5.0"
],
"env": {},
"display_name": "Javascript (Node.js)",
"language": "javascript"
}
},
"python3": {
"resource_dir": "C:\\Users\\User\\Anaconda3\\share\\jupyter\\kernels\\python3",
"spec": {
"argv": [
"C:\\Users\\User\\Anaconda3\\python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"env": {},
"display_name": "Python 3",
"language": "python"
}
}
}
}
(C:\Users\User\Anaconda3) C:\Users\User>
Please, let me know if you get stuck with any of the steps above.
Hi all,
I'm having similar issue when running "ijsinstall" or "ijs", and does anyone here know how to edit the cmd file for the command to execute as "jupyter-kernelspec" instead of "jupyter kernelspec" ?
I am well aware of having 2 python versions on my machine so I have uninstalled python 2.7 and removing the environment paths in windows but it seems not to work.
Are there any other workable suggestions?
Thank you.
Error: