删除已安装的两个 Jupyters 之一

问题描述 投票:0回答:2

在我的系统中,现在错误地安装了第二个 Jupyter。

which -a jupyter:
    /opt/homebrew/bin/jupyter  #latest jupyter which should be removed
    /opt/anaconda3/bin/jupyter #previous working jupyter

虽然第二个“

/opt/anaconda3/bin/jupyter
”是我正在使用的,但第一个“
/opt/homebrew/bin/jupyter
”由于错误的Python路径和已卸载的软件包而无法工作。

我尝试通过

brew uninstall jupyter,
删除此 jupyter,但由于此错误而失败
Error: No such keg: /opt/homebrew/Cellar/jupyter.

因为我在第二个 jupyter 上有很多包和库。 因此,我不愿意从头开始重新安装jupyter。 此时调用

Jupyer notebook
会调用第一条路径。您有什么建议来解决这个问题吗?

python jupyter-notebook anaconda homebrew
2个回答
0
投票

你有一个通过

brew
安装的Python,你应该能够做到

/opt/homebrew/bin/pip3 uninstall jupyter

请注意,根本问题似乎是您的

PATH
未设置,因此 anaconda bin 文件夹优先于
homebrew/bin
文件夹,您可能想也可能不想解决这个问题。您还可以考虑使用

卸载自制Python版本
brew uninstall python

0
投票

/opt/homebrew/bin/pip3 卸载 jupyter_core

© www.soinside.com 2019 - 2024. All rights reserved.