Jupyter Notebook,Windows 10中的内核错误(Errno 13权限被拒绝)

问题描述 投票:1回答:2

我已经在Windows 10上安装了Jupyter Notebook。我可以执行jupyter notebook命令。它打开并显示当前路径目录的列表。我也可以创建或打开笔记本。但是,当我这样做时,我在右上角收到内核错误。单击它后,将显示此窗口:

无法启动内核

未处理的错误

Traceback (most recent call last):
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 1699, in _execute
    result = await result
  File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 383, in __iter__
    return self.result()  # May raise too.
  File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
    raise self._exception
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
    raise self._exception
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
    raise self._exception
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
    raise self._exception
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "c:\users\lola\appdata\local\programs\python\python35\lib\contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\connect.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'

我文件中的代码没有用不同的颜色突出显示,运行时什么也没发生。

我是编程新手,所以请尝试以简单的文字提供建议,详细描述每个步骤。

[过去,我曾尝试删除Python,安装其他版本的Python,然后安装Anaconda。另外,为了使用tensorflow,我创建了一个特殊的环境。但是此错误保持不变。我怀疑问题是路径中的双反斜杠(“ //”),但我绝对不知道如何解决此问题。但也许问题出在其他方面。

python windows jupyter-notebook
2个回答
0
投票

这里有同样的问题。对我有用的是以管理员身份运行Anaconda Navigator。希望它也对您有用。


0
投票

此问题自jupyter_client的上一次更新以来发生。您可以通过降级到最新版本来暂时解决该问题。

conda install jupyter_client=5.3.1
© www.soinside.com 2019 - 2024. All rights reserved.