简体   繁体   中英

Jupyter Notebook showing error

I have installed jupyter but whenever i'm trying to open the notebook it's showing the below error:

**/home/hduser/.local/lib/python3.5/site-packages/IPython/paths.py:61: UserWarning: IPython dir '/home/hduser/.ipython' is not a writable location, using a temp directory.
  " using a temp directory.".format(ipdir))
[I 12:31:32.732 NotebookApp] Serving notebooks from local directory: /home/protyay
[I 12:31:32.733 NotebookApp] The Jupyter Notebook is running at:
[I 12:31:32.733 NotebookApp] http://localhost:8888/?token=b3b2ff7955e5825655d1dc1c4539f193a76c8ab89ffbf008
[I 12:31:32.733 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:31:32.733 NotebookApp] 

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:8888/?

token=b3b2ff7955e5825655d1dc1c4539f193a76c8ab89ffbf008
No protocol specified
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0**

If i open the url, then the notebook is getting displayed but it's not enabling me to create or open a new python3 notebook.

This is GUI related issue. To solve this please add the following configuration in your .bashrc :

export DISPLAY=:0

Gnome on Ubuntu 16.04, the correct value is DISPLAY=:1 (not DISPLAY=:0)

To fix this permanently you can add the following line at the end of /etc/sudoers using gedit or using sudo visudo :

Defaults env_keep+="DISPLAY"

Detailed Solution: https://askubuntu.com/questions/871092/failed-to-connect-to-mir-failed-to-connect-to-server-socket-no-such-file-or-di

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM