Jupyter notebook无法打开: pywintypes.error: (5, ‘SetFileSecurity‘, ‘Access is denied.‘)

问题:

启动jupyter notebook无法打开,发现是权限问题。

Traceback (most recent call last):
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1173, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 476, in write_connection_file
kernel_name=self.kernel_name
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 141, in write_connection_file
with secure_write(fname) as f:
File "D:\Chris\Continuum\anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 424, in secure_write
win32_restrict_file_to_user(fname)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 375, in win32_restrict_file_to_user
win32security.SetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION, sd)
pywintypes.error: (5, 'SetFileSecurity', 'Access is denied.')

解决方案:

jupyter notebook需要C:\Users\user.name\AppData\Roaming\jupyter目录的读写权限,如果没有可能导致无法打开,可以试着管理员身份运行,并在命令行先输入:

set JUPYTER_ALLOW_INSECURE_WRITES=1

然后在启动jupyter notebook。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值