Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
696 views
in Technique[技术] by (71.8m points)

python - Kernel error (Errno 13 Permission denied) in Jupyter Notebook, Windows 10

I have installed Jupyter Notebook on Windows 10. I can execute jupyter notebook command. It opens and shows a list of current path directories. I also can create or open a notebook. But when I do it I get Kernel error in the top right corner. After clicking on it this window appears:

Failed to start the kernel

Unhandled error

Traceback (most recent call last):
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadoweb.py", line 1699, in _execute
    result = await result
  File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 383, in __iter__
    return self.result()  # May raise too.
  File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
    raise self._exception
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packages
otebookservicessessionshandlers.py", line 72, in post
    type=mtype))
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 735, in run
    value = future.result()
  File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
    raise self._exception
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packages
otebookservicessessionssessionmanager.py", line 88, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 735, in run
    value = future.result()
  File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
    raise self._exception
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packages
otebookservicessessionssessionmanager.py", line 101, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 735, in run
    value = future.result()
  File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
    raise self._exception
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesornadogen.py", line 209, in wrapper
    yielded = next(result)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packages
otebookserviceskernelskernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesjupyter_clientmultikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesjupyter_clientmanager.py", line 240, in start_kernel
    self.write_connection_file()
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesjupyter_clientconnect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesjupyter_clientconnect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "c:userslolaappdatalocalprogramspythonpython35libcontextlib.py", line 59, in __enter__
    return next(self.gen)
  File "c:userslolaappdatalocalprogramspythonpython35libsite-packagesjupyter_clientconnect.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\Lola\AppData\Roaming\jupyter\runtime\kernel-fd884f4e-8208-4b8e-9db2-c048f869e042.json'

The code in my file is not highlighted in different colors and when I run it nothing happens.

I am new to programming, so please try to give advice in simple words, describing each step in detail.

In the past, I've tried to delete Python, install Python in different versions, install Anaconda. In addition, in order to work with tensorflow, I've created a special environment. But this error stays the same. I suspect the problem is a double backslash ("//") in the path, but I have absolutely no idea how to fix this. But perhaps the problem is something else.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Same exact problem here. What worked for me was running the Anaconda Navigator as an Administrator. Hope it works for you too.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...