当前位置:  开发笔记 > 编程语言 > 正文

由Python 3.5破坏的Jupyter笔记本

如何解决《由Python3.5破坏的Jupyter笔记本》经验,为你挑选了1个好方法。

当我将我的Python版本从3.4更新到3.5(在Mac El Capitan上)时,我重新安装了Jupyter但是当我运行它并创建一个新的Python 3笔记本时,它会立即告诉我存在内核错误,如果我点击这个,然后我收到此错误消息:

Traceback (most recent call last):   File
"/usr/local/lib/python3.5/site-packages/notebook/base/handlers.py",
line 436, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))   File
"/usr/local/lib/python3.5/site-packages/notebook/services/sessions/handlers.py",
line 56, in post
    model = sm.create_session(path=path, kernel_name=kernel_name)   File
"/usr/local/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py",
line 66, in create_session
    kernel_name=kernel_name)   File "/usr/local/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py",
line 84, in start_kernel
    **kwargs)   File "/usr/local/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py",
line 109, in start_kernel
    km.start_kernel(**kwargs)   File "/usr/local/lib/python3.5/site-packages/jupyter_client/manager.py",
line 244, in start_kernel
    **kw)   File "/usr/local/lib/python3.5/site-packages/jupyter_client/manager.py",
line 190, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)   File "/usr/local/lib/python3.5/site-packages/jupyter_client/launcher.py",
line 123, in launch_kernel
    proc = Popen(cmd, **kwargs)   File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py",
line 950, in __init__
    restore_signals, start_new_session)   File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py",
line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory:
'/usr/local/opt/python3/bin/python3.4'

我知道从3.4升级到3.5意味着软件包将安装在不同的地方,但是当我已经再次运行pip3 install jupyter时,我无法弄清楚它在Python 3.5软件包中的用途(并且已经卸载/重新安装)几次).有谁知道修复此问题?



1> minrk..:

IPython有一个剩余的kernelspec指向你的Python 3.4.您可以看到现有的kernelspecs:

jupyter kernelspec list

您可以使用安装新的IPython kernelspec

ipython kernelspec install [--user]

推荐阅读
ar_wen2402851455
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有