【问题标题】:Spyder Permission Error while starting the Kernel, Administrator rights do not change anything启动内核时出现 Spyder 权限错误,管理员权限不会更改任何内容
【发布时间】:2021-07-18 17:40:29
【问题描述】:

当我启动 Spyder 时,我收到一条错误消息,提示权限被拒绝。这是 Spyder 中的输出:

An error ocurred while starting the kernel
The error is:

Traceback (most recent call last):
File "C:\Users\John\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1223, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\Users\John\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 313, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "C:\Users\John\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 220, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\John\anaconda3\lib\site‑packages\jupyter_client\launcher.py", line 131, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\John\anaconda3\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\John\anaconda3\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access is denied

它最终会弹出一个提示:

link to image

我发现的建议是使用管理员权限运行 Spyder,但这并不能解决我的问题。我发现了一些其他建议来执行以下操作

根据@CarlosCordoba:“要解决此问题,OP 需要运行 conda update anaconda,然后在 Anaconda Prompt 中运行 conda update jupyter_client”

当我在 Anaconda cmd 提示符下以管理员权限运行 conda update anaconda 时,会发生这种情况

    Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: - menuinst Exception
Traceback (most recent call last):
  File "C:\Users\John\anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 246, in make_menu
    menuinst.install(join(prefix, win_path_ok(file_path)), remove, prefix)
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 58, in install
    _install(path, remove, prefix, mode='system')
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 33, in _install
    data = json.load(open(path))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\John\\anaconda3\\Menu\\notebook.json'menuinst Exception
Traceback (most recent call last):
  File "C:\Users\John\anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 246, in make_menu
    menuinst.install(join(prefix, win_path_ok(file_path)), remove, prefix)
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 58, in install
    _install(path, remove, prefix, mode='system')
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 33, in _install
    data = json.load(open(path))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\John\\anaconda3\\Menu\\notebook.jsodone
Rolling back transaction: - menuinst Exception
Traceback (most recent call last):
  File "C:\Users\John\anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 246, in make_menu
    menuinst.install(join(prefix, win_path_ok(file_path)), remove, prefix)
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 58, in install
    _install(path, remove, prefix, mode='system')
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 33, in _install
    data = json.load(open(path))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\John\\anaconda3\\Menu\\notebook.json'menuinst Exception
Traceback (most recent call last):
  File "C:\Users\John\anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 246, in make_menu
    menuinst.install(join(prefix, win_path_ok(file_path)), remove, prefix)
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 58, in install
    _install(path, remove, prefix, mode='system')
  File "C:\Users\John\anaconda3\lib\site-packages\menuinst\__init__.py", line 33, in _install
    data = json.load(open(path))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\John\\anaconda3\\Menu\\notebook.jsodone

[WinError 5] Access is denied
()

有什么帮助吗?我只对 Python 有一点了解,并在课堂上使用它进行数学优化。

编辑:一些额外的信息。当我尝试从 Anaconda Navigator 启动 Spyder 时,它只会永远旋转,永远不会启动。

【问题讨论】:

    标签: python anaconda spyder


    【解决方案1】:

    我修好了!我做了一个软启动,然后在 Anaconda 终端中运行spyder --reset。然后,以管理员权限运行 Spyder,它就可以连接了!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-31
      • 2011-09-29
      • 2021-08-12
      • 2014-04-18
      • 1970-01-01
      • 2019-07-07
      • 2010-11-23
      • 2011-12-01
      相关资源
      最近更新 更多