ubuntu中运行jupyter notebook创建Python文件的时候报错

创建Python文件的时候遇到下面的错误:

Creating Notebook Failed
An error occurred while creating a new notebook.
Unexpected error while saving file: arma/Untitled.ipynb [Errno 13] Permission denied: ‘/home/wang/.local/share/jupyter/notebook_secret’

解决方案:
修改文件权限:
(my_env) wang@ubuntu:~ sudochmod+777.local/share/jupyter/(myenv)wang@ubuntu:  cd .local/share/jupyter/
(my_env) wang@ubuntu:~/.local/share/jupyter lsruntime(myenv)wang@ubuntu: /.local/share/jupyter sudo chmod +777 runtime/
(my_env) wang@ubuntu:~/.local/share/jupyter cdruntime/(myenv)wang@ubuntu: /.local/share/jupyter/runtime ls
notebook_cookie_secret
(my_env) wang@ubuntu:~/.local/share/jupyter/runtime sudovinotebookcookiesecret(myenv)wang@ubuntu: /.local/share/jupyter/runtime ls
notebook_cookie_secret
(my_env) wang@ubuntu:~/.local/share/jupyter/runtime cd/home/wpython/(myenv)wang@ubuntu:/home/wpython ls
arma blog learn learn2 learning_log PycharmProjects

重新启动jupyter notebook 即可;

(my_env) wang@ubuntu:~/.local/share/jupyter/runtime lsnotebookcookiesecret(myenv)wang@ubuntu: /.local/share/jupyter/runtime cd /home/wpython/
(my_env) wang@ubuntu:/home/wpython lsarmabloglearnlearn2learninglogPycharmProjects(myenv)wang@ubuntu:/home/wpython jupyter notebook
[I 15:57:54.731 NotebookApp] Serving notebooks from local directory: /home/wpython
[I 15:57:54.732 NotebookApp] 0 active kernels
[I 15:57:54.732 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=487d99c93782f3dab2319c50d2a156ea32f4fabd424bf84e
[I 15:57:54.732 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:57:54.737 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:8888/?token=487d99c93782f3dab2319c50d2a156ea32f4fabd424bf84e

已在现有的浏览器会话中创建新的窗口。
[I 15:58:17.945 NotebookApp] 302 GET /?token=487d99c93782f3dab2319c50d2a156ea32f4fabd424bf84e (127.0.0.1) 1.40ms
[I 15:58:38.839 NotebookApp] Creating new notebook in /arma
[I 15:58:38.845 NotebookApp] Writing notebook-signing key to /home/wang/.local/share/jupyter/notebook_secret
[I 15:58:40.769 NotebookApp] Kernel started: 4ff8f979-8a16-4cce-b05c-c2a51c448dc6
[I 16:00:40.584 NotebookApp] Saving file at /arma/Untitled.ipynb

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值