通过Anaconda Navigator打开Jupyter Notebook遇权限错误求助
Jupyter Notebook启动权限错误解决方法
报错信息
[W 2024-08-19 18:25:22.912 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [W 2024-08-19 18:25:23.012 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2024-08-19 18:25:24.107 ServerApp] Extension package panel.io.jupyter_server_extension took 1.0940s to import [I 2024-08-19 18:25:24.129 ServerApp] jupyter_lsp | extension was successfully linked. [I 2024-08-19 18:25:24.135 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2024-08-19 18:25:24.141 ServerApp] jupyterlab | extension was successfully linked. [I 2024-08-19 18:25:24.146 ServerApp] notebook | extension was successfully linked. [W 2024-08-19 18:25:24.540 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_nbextensions_configurator. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2024-08-19 18:25:24.540 ServerApp] jupyter_nbextensions_configurator | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths. [I 2024-08-19 18:25:24.540 ServerApp] jupyter_nbextensions_configurator | extension was successfully linked. [I 2024-08-19 18:25:24.540 ServerApp] notebook_shim | extension was successfully linked. [I 2024-08-19 18:25:24.540 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked. [I 2024-08-19 18:25:24.582 ServerApp] notebook_shim | extension was successfully loaded. [I 2024-08-19 18:25:24.584 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2024-08-19 18:25:24.584 ServerApp] [jupyter_nbextensions_configurator] enabled 0.6.4 [I 2024-08-19 18:25:24.584 ServerApp] jupyter_nbextensions_configurator | extension was successfully loaded. [I 2024-08-19 18:25:24.585 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2024-08-19 18:25:24.589 LabApp] JupyterLab extension loaded from C:\ProgramData\anaconda3\Lib\site-packages\jupyterlab [I 2024-08-19 18:25:24.589 LabApp] JupyterLab application directory is C:\ProgramData\anaconda3\share\jupyter\lab [I 2024-08-19 18:25:24.590 LabApp] Extension Manager is 'pypi'. [I 2024-08-19 18:25:24.592 ServerApp] jupyterlab | extension was successfully loaded. [I 2024-08-19 18:25:24.599 ServerApp] notebook | extension was successfully loaded. [I 2024-08-19 18:25:24.600 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded. [I 2024-08-19 18:25:24.601 ServerApp] Serving notebooks from local directory: C:\Users\Henrique [I 2024-08-19 18:25:24.601 ServerApp] Jupyter Server 2.14.1 is running at: [I 2024-08-19 18:25:24.601 ServerApp] http://localhost:8888/tree?token=972cbd235a5cc3a6c3648fb897d5500c839132152a0a133a [I 2024-08-19 18:25:24.601 ServerApp] http://127.0.0.1:8888/tree?token=972cbd235a5cc3a6c3648fb897d5500c839132152a0a133a [I 2024-08-19 18:25:24.601 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [E 2024-08-19 18:25:24.601 ServerApp] Failed to write server-info to C:\Users\Henrique\AppData\Roaming\jupyter\runtime\jpserver-14092.json: PermissionError(13, 'Permission denied') Traceback (most recent call last): File "C:\ProgramData\anaconda3\Scripts\jupyter-notebook-script.py", line 10, in sys.exit(main()) ^^^^^^ File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_server\extension\application.py", line 623, in launch_instance serverapp.start() File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_server\serverapp.py", line 3119, in start self.start_app() File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_server\serverapp.py", line 3023, in start_app self.write_browser_open_files() File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_server\serverapp.py", line 2890, in write_browser_open_files self.write_browser_open_file() File "C:\ProgramData\anaconda3\Lib\site-packages\jupyter_server\serverapp.py", line 2913, in write_browser_open_file with open(self.browser_open_file, "w", encoding="utf-8") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Henrique\\AppData\\Roaming\\jupyter\\runtime\\jpserver-14092-open.html'
核心问题
启动Jupyter Notebook时,程序没有权限写入C:\Users\Henrique\AppData\Roaming\jupyter\runtime目录下的文件,导致报错。
解决步骤
方法1:以管理员身份运行Anaconda Navigator
右键点击桌面或开始菜单中的Anaconda Navigator图标,选择「以管理员身份运行」,之后再尝试打开Jupyter Notebook。方法2:修改Jupyter的工作目录
- 打开Anaconda Navigator,找到Jupyter Notebook,点击右侧的⚙️设置图标
- 在「Command」输入框的末尾添加:
--notebook-dir="C:\Users\Henrique\Documents" - 点击「Save」保存设置,然后重新启动Jupyter Notebook
方法3:修复目录权限
- 打开文件资源管理器,输入路径
C:\Users\Henrique\AppData\Roaming\jupyter并回车 - 右键点击
jupyter文件夹,选择「属性」→「安全」选项卡 - 检查当前用户(Henrique)是否有「写入」权限;如果没有,点击「编辑」按钮
- 点击「添加」,输入自己的用户名(Henrique),点击「检查名称」后确认
- 勾选用户权限中的「写入」,点击「应用」→「确定」保存设置
- 打开文件资源管理器,输入路径
内容的提问来源于stack exchange,提问作者Henrique Bozzo
相关产品推荐
相关产品推荐

