Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  • Start "file:///home/purit/.local/share/jupyter/runtime/nbserver-26-op ...
  •   + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException   + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand 
like image 339
Cheolsoon Im Avatar asked Jul 09 '20 11:07

Cheolsoon Im


2 Answers

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.

like image 132
Maitreya Verma Avatar answered Sep 23 '22 20:09

Maitreya Verma


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.

like image 44
josebrwn Avatar answered Sep 25 '22 20:09

josebrwn