简体   繁体   English

如何在 anaconda 上解决 Jupyter 中的这个内核错误

[英]How can I solve this kernal error in Jupyter on anaconda

I tried to open a notebook from jupyter but I have the message below.我试图从 jupyter 打开笔记本,但我收到以下消息。 Does anyone know how to solve this problem?有谁知道如何解决这个问题? FYI, I have installed anaconda3 64bit on windows 10.仅供参考,我已经在 Windows 10 上安装了 anaconda3 64 位。

Thanks in advance.提前致谢。

    Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
    result = await result
  File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Anaconda3\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:\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "C:\Anaconda3\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:\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "C:\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "C:\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "C:\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "C:\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "C:\Anaconda3\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\Anaconda3\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\\K\\AppData\\Roaming\\jupyter\\runtime\\kernel-4a355bda-9e3b-4ec8-af5c-f28225b6efa3.json'

Please try out by creating a new conda environment.请通过创建新的 conda 环境进行尝试。 Create conda environment using the command :使用以下命令创建 conda 环境:

conda create -n <env_name> -c intel python=3.6

Activate the environmemt using the command :使用以下命令激活环境:

source activate <env_name>

Please install the required packages in this environment.请在此环境中安装所需的软件包。 Kindly install the ipykernal using the command:请使用以下命令安装 ipykernal:

conda install ipykernel
ipython kernel install --name <env_name> --user 

Select the installed ipykernal from jupyter notebook.从 jupyter notebook 中选择已安装的 ipykernal。 Please refer this link : https://github.com/jupyter/notebook/issues/2301请参考此链接: https://github.com/jupyter/notebook/issues/2301 : https://github.com/jupyter/notebook/issues/2301

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM