模块未找到错误:找不到名为“jupyter_core”的模块。

3

我正在使用Windows电脑启动Jupyter笔记本服务器,该服务器运行在虚拟的Ubuntu 16.04上。我希望输出一个URL,以便我可以将其粘贴到互联网浏览器中并运行.ipynb文件。jupyter notebook --ip 0.0.0.0 在我升级Python到3.7之后产生了以下错误。

*(在升级之前,Jupyter笔记本一直正常工作)

pkj_admin@ip-50-60-0-75:~$  jupyter notebook --ip 0.0.0.0    
Traceback (most recent call last):
  File "/usr/local/bin/jupyter", line 5, in <module>
    from jupyter_core.command import main
ModuleNotFoundError: No module named 'jupyter_core'

谢谢

2个回答

0

这是Jupyter Notebook中非常常见的问题。它会提示当前安装包中找不到jupyter_core,可能与路径混乱有关。

jupyter_core可能已经在本地安装了,但是它正在查找根或系统Python版本。尝试在那里卸载并重新安装jupyter

>> python -m pip uninstall jupyter-core;python -m pip uninstall jupyter;

# inside conda env or similar env
>> pip uninstall jupyter
>> pip install jupyter

参考:如何移除Jupyter。


0

我也遇到了这个问题。我通过以下方法解决了它:

pip3 install jupyter

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接