首页 > 解决方案 > 使用 dnf 安装 jupyter notebook

问题描述

我报告了使用 dnf install notebook 或 dnf install jupyter-notebook 在 Fedora 28 系统上安装 jupyter notebook 的问题。运行jupyter notebook时安装的代码崩溃,并且回溯显示权限问题。

File "/usr/lib/python3.6/site-packages/notebook/notebookapp.py", line 710, in _default_cookie_secret
with io.open(self.cookie_secret_file, 'rb') as f:
PermissionError: [Errno 13] Permission denied: '/run/user/1000/jupyter/notebook_cookie_secret'

我怀疑存在配置问题,因为 /run/user/1000 归 root 所有。默认路径设置为: jupyter --paths

config:
    /home/olin/.jupyter
    /usr/etc/jupyter
    /usr/local/etc/jupyter
    /etc/jupyter

data:
    /home/olin/.local/share/jupyter
    /usr/local/share/jupyter
    /usr/share/jupyter

runtime:
    /run/user/1000/jupyter

标签: jupyter-notebook

解决方案


好的,简单的回答。
chmod a+r /run/user/1000/jupyter
chmod a+r /run/user/1000/jupyter/notebook_cookie_secret
解决了这个问题。这需要添加到文档中...


推荐阅读