Spyder Permission Error while starting the Kernel, Administrator rights do not change anything

Viewed 205

when I start Spyder I get an error that says permission denied. This is the output from that in 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

It eventual pops up with a prompt that says

link to image

The advice I've found is to run Spyder in with administrator rights, but this does not fix my issue. I've found some other advice to do the following

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

When I run conda update anaconda in the Anaconda cmd prompt with administrator rights this is what happens

    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
()

Any help? I've only got a little knowledge in Python, and using this for mathematical optimization in a class.

EDIT: A little extra information. When I try to launch Spyder from the Anaconda Navigator it just spins forever, never launching.

1 Answers

I fixed it! I did a soft boot, and then in the Anaconda terminal ran spyder --reset. Then, ran Spyder with Administrative privileges, and it was able to connect!

Related