Jupyter Notebook 在访问 .local/share/jupyter/runtime 时因错误而停止工作

Jupyter Notebook 在访问 .local/share/jupyter/runtime 时因错误而停止工作

每次我尝试启动 jupyter 笔记本时,都会收到以下消息。它以前运行正常,但我可能在其他安装中搞砸了一些东西。.local/共享/jupyter/运行时文件夹和笔记本秘密在 jupyter 文件夹中无法访问,我似乎找不到解决方案。

~$ jupyter notebook
[I 16:25:34.824 NotebookApp] Writing notebook server cookie secret to /home/polina/.local/share/jupyter/runtime/notebook_cookie_secret
[E 16:25:34.824 NotebookApp] Failed to write cookie secret to /home/polina/.local/share/jupyter/runtime/notebook_cookie_secret: [Errno 13] Permission denied: '/home/polina/.local/share/jupyter/runtime/notebook_cookie_secret'
[W 16:25:34.824 NotebookApp] Could not set permissions on /home/polina/.local/share/jupyter/runtime/notebook_cookie_secret
/usr/local/lib/python3.6/dist-packages/IPython/paths.py:61: UserWarning: IPython dir '/home/polina/.ipython' is not a writable location, using a temp directory.
  " using a temp directory.".format(ipdir))
[I 16:25:35.049 NotebookApp] Serving notebooks from local directory: /home/polina
[I 16:25:35.050 NotebookApp] The Jupyter Notebook is running at:
[I 16:25:35.050 NotebookApp] http://localhost:8888/?token=d0f9d4cec98184cc9ba0f11a19f24bd783176e012ecac56a
[I 16:25:35.050 NotebookApp]  or http://127.0.0.1:8888/?token=d0f9d4cec98184cc9ba0f11a19f24bd783176e012ecac56a
[I 16:25:35.050 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[E 16:25:35.050 NotebookApp] Failed to write server-info to /home/polina/.local/share/jupyter/runtime/nbserver-4168.json: [Errno 13] Permission denied: '/home/polina/.local/share/jupyter/runtime/nbserver-4168.json'
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/local/lib/python3.6/dist-packages/notebook/notebookapp.py", line 1834, in start
    self.write_browser_open_file()
  File "/usr/local/lib/python3.6/dist-packages/notebook/notebookapp.py", line 1752, in write_browser_open_file
    with open(self.browser_open_file, 'w', encoding='utf-8') as f:
PermissionError: [Errno 13] Permission denied: '/home/polina/.local/share/jupyter/runtime/nbserver-4168-open.html'

相关内容