Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda-Jupyter Doesn't open in browser

I installed Anaconda 3.7 on Ubuntu 18.04 (Bionic Beaver). Installation was successful. When I tried to start Jupyter Notebook from navigator it throws the following error.

Access to the file was denied The file at file:///run/user/1000/jupyter/nbserver-26395-open.html is not readable. It may have been removed, moved or file permissions may be preventing access.

like image 278
Neera Avatar asked Dec 30 '18 23:12

Neera


3 Answers

For me, this worked on Raspberry Pi4, Ubuntu 20.04, with Chromium Browser.

Generate the config file with following command.

jupyter notebook --generate-config

Config file is created at ~/.jupyter directory

Look for parameter c.NotebookApp.use_redirect_file and set the same as False.

c.NotebookApp.use_redirect_file = False in order to disable launching browser by redirect file .

Explanation:

For versions of notebook > 5.7.2, a security feature measure was added that prevented the authentication token used to launch the browser from being visible. This feature makes it difficult for other users on a multi-user system from running code in your Jupyter session as you. However, some environments (like Windows Subsystem for Linux (WSL) and Chromebooks), launching a browser using a redirect file can lead the browser failing to load. This is because of the difference in file structures/paths between the runtime and the browser.

Also make sure the ~/.local/share/jupyter and ~/.jupyter directories are owned by the user running jupyter

like image 77
Arun Avatar answered Sep 27 '22 17:09

Arun


I think you have changed your default browser from Firefox to something else, Jupyter Notebook works fine on Firefox but throws permission denied on Chromium (for me). Just go to Setting > Details > Default Application and select FireFox in Web. Cheers

like image 26
OMAR Avatar answered Sep 27 '22 18:09

OMAR


Ckick the link your terminal

As shown in the image, jupyter notebook also provides a link. Try opening it with the browser of your choice. It worked for me...

like image 21
Rahul Sood Avatar answered Sep 27 '22 18:09

Rahul Sood