我使用Ubuntu作为操作系统。我已经能够通过命令行下载并打开anaconda导航器。但我无法打开Jupyter实验室或Jupyter笔记本。它给了我以下错误。
Access to the file was denied
The file at file:///home/basant/.local/share/jupyter/runtime/jpserver-6359-open.html is not readable. It may have been removed, moved or file permissions may be preventing access.
我尝试更改权限,但无济于事。卸载并重新安装所有内容。没用。
我在Ubuntu升级后遇到了同样的问题。问题通过两个步骤解决:
-
从终端类型生成jupyter配置文件:
jupyter notebook --generate-config
-
然后打开保存在/home/username/.jupyter/jupyter_notebook_config.py中的文件,附加
c.NotebookApp.use_redirect_file = False
并保存。您现在可以启动jupyter。
我没有足够的信誉来添加评论,这本来是我的偏好,但发现上面的答案也解决了使用jupyter-lab
的Ubuntu 22.04
上的类似问题。我正在使用没有蟒蛇的Jupyter:
输入:jupyter-lab
输出:Access to the file was denied
The file at .local/share/jupyter/runtime/jpserver-42340-open.html is not readable.
It may have been removed, moved, or file permissions may be preventing access.
该文件不存在,因此更改权限毫无意义。