启动ipython内核发生错误_在Spyder的IPython控制台中启动内核时出现PermissionError

When I launch spyder, this error appears :

Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1572, in create_kernel_manager_and_kernel_client

kernel_manager.start_kernel(stderr=stderr_handle)

File "C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel

self.write_connection_file()

File "C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 547, in write_connection_file

kernel_name=self.kernel_name

File "C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 212, in write_connection_file

with secure_write(fname) as f:

File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in __enter__

return next(self.gen)

File "C:\ProgramData\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 102, in secure_write

with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Sébastien\\AppData\\Roaming\\jupyter\\runtime\\kernel‑e1f2b044843b.json'

I am not experienced at all in programming but I tried to enter commands in the Anaconda prompt but none of this worked ("conda update jupyter_client" and "conda update --all")

I also tried to install and uninstall but I still get the same error.

解决方案

This seems a permissions issue. Running Spyder as administrator (right click on it-> run as administrator) solves the problem.

UPDATE:

As per @CarlosCordoba: "To fix this the OP needs to run conda update anaconda and then conda update jupyter_client in the Anaconda Prompt"

Note that the original workaround worked as well in this case.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值