Python 启动内核时出现Spyder权限错误,管理员权限不会更改任何内容

Python 启动内核时出现Spyder权限错误,管理员权限不会更改任何内容,python,anaconda,spyder,Python,Anaconda,Spyder,当我启动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 c

当我启动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
它最终会弹出一个提示,上面写着

我发现的建议是使用管理员权限在中运行Spyder,但这并不能解决我的问题。我找到了一些其他的建议来做下面的事情

根据@CarlosCordoba:“要解决此问题,OP需要在anaconda提示符中运行conda update anaconda,然后运行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时,它会永远旋转,永远不会发射。

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