安装xbpch之后的Jupyter内核错误

时间:2018-10-24 21:06:27

标签: python python-3.x anaconda jupyter-notebook

我是python和jupyter笔记本的新用户。最近,我使用以下命令在anaconda提示符中安装了xbpch(https://xbpch.readthedocs.io/en/latest/index.html)软件包:conda install -c conda-forge xbpch 之后,每次我打开jupyter笔记本时,此回溯消息都会出现内核错误:

Traceback (most recent call last):
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\web.py", line 1592, in _execute
    result = yield result
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1133, in run
    value = future.result()
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\notebook\services\sessions\handlers.py", line 73, in post
    type=mtype))
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1133, in run
    value = future.result()
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1133, in run
    value = future.result()
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 1133, in run
    value = future.result()
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\tornado\gen.py", line 326, in wrapper
    yielded = next(result)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 160, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\jupyter_client\manager.py", line 259, in start_kernel
    **kw)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\jupyter_client\manager.py", line 204, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\Users\Anaconda3\envs\snowflakes\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

有人知道如何解决此问题吗?

1 个答案:

答案 0 :(得分:0)

转到您的Jupyter目录(例如C:\Users\Admin\AppData\Roaming\jupyter\kernels\python3) 然后制作kernel.json(例如{{1})的副本,然后用记事本或JS IDE打开。 应该像这样: kernel_old.json 如果您遇到这种情况,请使用Anaconda3 python更改路径:{ "argv": [ "C:\Users\Admin\AppData\Local\Programs\python\python37\python.exe", "-m", "ipykernel_launcher", "-f", "{connection_file}" ], "display_name": "Python 3", "language": "python" } 然后再次启动jupyter。