首页 > 解决方案 > 降级 Python(非 Conda)后 Jupyter 无法正常工作

问题描述

有一个关于如何在降级 Python 后让 Jupyter 正确链接的线程,但这是指 Conda 安装。我降级 Python 的动机是TensorFlow 在 Python 3.7 上被破坏了

卸载 Jupyter 并降级 Python 后,我收到此错误。

/usr/local/bin/jupyter: /usr/local/Cellar/jupyter/1.0.0_5/libexec/bin/jupyter: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory
/usr/local/bin/jupyter: line 2: /usr/local/Cellar/jupyter/1.0.0_5/libexec/bin/jupyter: Undefined error: 0

如何正确链接 Jupyter 和 Python 以正常工作?

谢谢,纳库尔

标签: pythonjupyter

解决方案


首先尝试卸载 jupyter notebook:

brew uninstall jupyter(如果你在 Mac 上)

或者python3 -m pip uninstall jupyter

然后通过以下方式强制重新安装jupyter:

python3 -m pip install jupyter --force


推荐阅读