Reputation: 726
I installed wsl(Windows Subsystem for Linux) with ubuntu and jupyter notebook on it. When I run my jupyternote book, I get this error message. Could you give me some advice? Many thanks in advance!
Start : This command cannot be run due to the error: The system cannot find the file specified. At line:1 char:1
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Upvotes: 58
Views: 38833
Reputation: 1139
I have done following steps,
jupyter notebook --generate-config
sudo nano /home/{username}/.jupyter/jupyter_notebook_config.py
#
from => c.NotebookApp.use_redirect_file = True (I changed True to False)
c.NotebookApp.notebook_dir = '/mnt/d/Jupyter/'
Upvotes: 2
Reputation: 647
Here's a nice walkthrough that explains how to set up jupyter notebook to run with WSL and launch your browser in Windows without this error:
There are two important steps:
jupyter notebook --generate-config
to generate the file ~/.jupyter/jupyter_notebook_config.py
then change the following line:c.NotebookApp.use_redirect_file = False
~/.bashrc
E.g.export BROWSER='/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'
Don't forget to source bashrc:
source ~/.bashrc
That should fix the error without having to run jupyter notebook --no-browser
.
Upvotes: 39
Reputation: 661
This one worked for me.
jupyter notebook --port=8889 --no-browser
You can also checkout this thread if any other solutions work out for you.
Upvotes: 54
Reputation: 91
Apparently the problem occurs because the Jupyter notebook tries to open the browser after it is started. To disable this, follow these steps:
$ jupyter notebook --generate-config
$ cd /home/YourUser/.jupyter/
$ nano jupyter_notebook_config.py
Now you need scroll down and find "NotebookApp.open_browserBool", remove the # and set it to False. Save your config file and start jupyter notebook again.
Upvotes: 9
Reputation: 35
This is interesting. I actually get the same error. I am currently using ubuntu 20.04 but never had a problem with an older version. My question is, does the jupyter notebook you're setting up still work? Because for me, the links it gives actually do still work and I can run everything perfectly. So it might be worth it to just try the links.
Upvotes: 3