无法打开新的Jupyter Notebook [权限被拒绝] [英] Cannot open new Jupyter Notebook [Permission Denied]

查看:1766
本文介绍了无法打开新的Jupyter Notebook [权限被拒绝]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用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

保存文件时出现意外错误:深度学习/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目录的所有权 root 更改为用户.

sudo chown -R user:user ~/.local/share/jupyter 

请参阅此处: https://github.com/ipython/ipython/issues/8997

冒号前的第一个user是您的用户名,冒号后的第二个user是您的用户组.如果得到chown: [user]: illegal group name,请使用groups查找您的组,或者不使用sudo chown user: ~/.local/share/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.

编辑:在答案的注释中添加了-R选项.您必须为用户更改此目录内(或~/.jupyter/中的任何文件,如果它给您PermissionError)的所有文件的所有权,以使其起作用.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆