Cheolsoon Im
Cheolsoon Im

Reputation: 726

Start : This command cannot be run due to the error: The system cannot find the file specified

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

Upvotes: 58

Views: 38833

Answers (5)

Rinshan Kolayil
Rinshan Kolayil

Reputation: 1139

I have done following steps,

  1. Run jupyter notebook --generate-config
  2. Run sudo nano /home/{username}/.jupyter/jupyter_notebook_config.py
  3. Removed # from => c.NotebookApp.use_redirect_file = True (I changed True to False)
  4. And also i added windows path as default notebook_dir c.NotebookApp.notebook_dir = '/mnt/d/Jupyter/'

Upvotes: 2

j_d_b
j_d_b

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:

https://towardsdatascience.com/running-jupyter-notebook-on-wsl-while-using-firefox-on-windows-5a47ebfae4c1?gi=fc70b24c75bf

There are two important steps:

  1. Run jupyter notebook --generate-config to generate the file ~/.jupyter/jupyter_notebook_config.py then change the following line:

c.NotebookApp.use_redirect_file = False

  1. Add your browser to ~/.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

Maitreya Verma
Maitreya Verma

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

Raul Oliveira
Raul Oliveira

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

Schalky
Schalky

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

Related Questions