无法打开新的 Jupyter Notebook [权限被拒绝] [英] Cannot open new Jupyter Notebook [Permission Denied]
问题描述
我已经使用 pip3 在 ubuntu 16.04 上安装了 Jupyter Notebook.我可以执行 jupyter notebook
命令.它会打开并显示当前路径目录的列表.
I have installed Jupyter Notebook on ubuntu 16.04 using pip3. I can execute jupyter notebook
command. It opens and shows a list of current path directories.
但我无法创建新笔记本(Python3).它说
But I cannot create a new notebook(Python3). It says
保存文件时出现意外错误:Deep Learning/NN/Untitled.ipynb [Errno 13] 权限被拒绝:'/home/ubuntu/.local/share/jupyter/notebook_secret'
Unexpected error while saving file: Deep Learning/NN/Untitled.ipynb [Errno 13] Permission denied: '/home/ubuntu/.local/share/jupyter/notebook_secret'
推荐答案
从根目录更改~/.local/share/jupyter
目录的所有权 给用户.
sudo chown -R user:user ~/.local/share/jupyter
参见此处:https://github.com/ipython/ipython/issues/8997一个>
冒号前的第一个 user
是您的用户名,冒号后的第二个 user
是您的组.如果你得到 chown: [user]:非法组名
,用 groups
找到你的组,或者用 sudo chown user: ~/.local/不指定组分享/jupyter
.
The first user
before the colon is your username, the second user
after the colon is your group. If you get chown: [user]: illegal group name
, find your group with groups
, or specify no group with sudo chown user: ~/.local/share/jupyter
.
EDIT:在答案的注释中添加了 -R
选项.您必须将此目录中(或 ~/.jupyter/
中的所有文件的所有权更改为您的用户以使其工作.
EDIT: Added -R
option in comments to the answer. You have to change ownership of all files inside this directory (or inside ~/.jupyter/
, wherever it gives you PermissionError) to your user to make it work.
这篇关于无法打开新的 Jupyter Notebook [权限被拒绝]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!