Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a little trouble with Jupyter Notebook, which is not opening in my browser.
I have spent the last two hours on tutorials to solve the problem, and just don't understand what the cause of it.
I am working on Ubuntu 19.04 disco dingo.
I have installed jupyter core 4.6.1, and jupyter-notebook : 5.7.8.
Code:
user@host:~$ jupyter notebook
[I 14:08:44.748 NotebookApp] The port 8888 is already in use, trying another port.
[I 14:08:44.753 NotebookApp] Serving notebooks from local directory: /home/usr
[I 14:08:44.754 NotebookApp] The Jupyter Notebook is running at:
[I 14:08:44.754 NotebookApp] http://localhost:8889/?token=e689e92b21a8e1a1af49753fd70df83150ea132e31e27fa2
[I 14:08:44.754 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:08:44.756 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/usr/.local/share/jupyter/runtime/nbserver-6350-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=e689e92b21a8e1a1af49753fd70df83150ea132e31e27fa2
Would anyone know why the Jupyter notebook is not opening directly in a browser?
Thanks beachboy2, I have run the first command successfully.
However, the second gives the same result:
Code:
usr@host:~$ jupyter notebook
[I 15:54:13.944 NotebookApp] Serving notebooks from local directory: /home/usr
[I 15:54:13.944 NotebookApp] The Jupyter Notebook is running at:
[I 15:54:13.944 NotebookApp] http://localhost:8888/?token=93cb395e62594c623c17f8e397d2e0d1b3b17432cba6a215
[I 15:54:13.944 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:54:13.947 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/usr/.local/share/jupyter/runtime/nbserver-10170-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=93cb395e62594c623c17f8e397d2e0d1b3b17432cba6a215
And the browser page (firefox) gives the following message:
Quote:
Access to the file was denied
The file at /home/usr/.local/share/jupyter/runtime/nbserver-10170-open.html is not readable.
It may have been removed, moved, or file permissions may be preventing access.
Last edited by Drosera_capensis; 01-20-2020 at 10:01 AM.
To be on the safe side, I have given full permission on the file.
When opened directly with:
Code:
jupyter notebook file
[I 16:39:36.637 NotebookApp] The Jupyter Notebook is running at:
[I 16:39:36.637 NotebookApp] http://localhost:8888/?token=e08837a263b840e9744f0d0db3d3cdbc3d957c48e07990d0
[I 16:39:36.637 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:39:36.641 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/usr/.local/share/jupyter/runtime/nbserver-19293-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=e08837a263b840e9744f0d0db3d3cdbc3d957c48e07990d0
The webpage gives:
Code:
Firefox can't find the file at /tmp/tmpKNd42Y.html.
The first link gives access to this page:
Code:
The file at /home/usr/.local/share/jupyter/runtime/nbserver-19293-open.html is not readable.
The second link gives access to the Jupyter browser. When trying to open the document, it gives:
Code:
500 : Internal Server Error
I know the file is not corrupted, as it was working previously.
Would anyone have an idea of what is happening?
Last edited by Drosera_capensis; 01-21-2020 at 11:22 AM.
This command line has solved my browser problem. Therefore, it is opening the Jupyter browser interface when executing the command:
Code:
Jupyter notebook
However, trying to open the file.ipynb, it still gives
Code:
500 : Internal Server Error
on the web page.
I have tried to upgrade nconvert or to re-install it to solve the problem, as mentioned in different forums, but it doesn't work.
Does anyone has another solution for this?
I vaguely remember something related to the way jupyter wrongly binds to IPs.
Try adding --ip=0.0.0.0 or --host=0.0.0.0 to your jupyter launching command.
Sorry for being obscure, all I remember I found this in a github issue by googling and added it to my personal knowledge base, but didn't record the source link.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.