簡體   English   中英

Jupyter Notebook顯示錯誤

[英]Jupyter Notebook showing error

我已經安裝了jupyter,但是每當我嘗試打開筆記本時,它都會顯示以下錯誤:

**/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**

如果我打開url,則會顯示筆記本,但這無法使我創建或打開新的python3筆記本。

這是與GUI相關的問題。 為了解決這個問題,請在.bashrc中添加以下配置:

出口DISPLAY =:0

在Ubuntu 16.04上的Gnome,正確的值為DISPLAY =:1(不是DISPLAY =:0)

要永久解決此問題,您可以使用gedit或sudo visudo在/ etc / sudoers的末尾添加以下行:

默認值env_keep + =“ DISPLAY”

詳細的解決方案: https : //askubuntu.com/questions/871092/failed-to-connect-to-mir-failed-to-connect-to-server-socket-no-such-file-or-di

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM