问题描述
我已经在 Windows 10 上安装了 Jupyter Notebook.我可以执行 jupyter notebook 命令.它打开并显示当前路径目录的列表.我还可以创建或打开笔记本.但是当我这样做时,我在右上角收到内核错误.点击后会出现这个窗口:
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:
无法启动内核
未处理的错误
Traceback (most recent call last):
File "c:userslolaappdatalocalprogramspythonpython35libsite-packages ornadoweb.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-packages ornadogen.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-packages ornadogen.py", line 735, in run
value = future.result()
File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
raise self._exception
File "c:userslolaappdatalocalprogramspythonpython35libsite-packages ornadogen.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-packages ornadogen.py", line 735, in run
value = future.result()
File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
raise self._exception
File "c:userslolaappdatalocalprogramspythonpython35libsite-packages ornadogen.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-packages ornadogen.py", line 735, in run
value = future.result()
File "c:userslolaappdatalocalprogramspythonpython35libasynciofutures.py", line 294, in result
raise self._exception
File "c:userslolaappdatalocalprogramspythonpython35libsite-packages ornadogen.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.
过去,我尝试过删除Python,安装不同版本的Python,安装Anaconda.此外,为了使用 tensorflow,我创建了一个特殊的环境.但是这个错误保持不变.我怀疑问题是路径中的双反斜杠(//"),但我完全不知道如何解决这个问题.但也许问题出在别的地方.
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.
推荐答案
同样的问题.对我有用的是以管理员身份运行 Anaconda Navigator.希望它也适用于您.
Same exact problem here. What worked for me was running the Anaconda Navigator as an Administrator. Hope it works for you too.
这篇关于Windows 10 Jupyter Notebook 中的内核错误(Errno 13 Permission denied)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!