我已经安装了 jupyter 但想卸载它。然而这是不可能的:
$ pip freeze | grep jupyter
$ pip3 freeze | grep jupyter
jupyter-client==5.1.0
jupyter-console==5.2.0
jupyter-core==4.3.0
$ pip3 uninstall jupyter
Cannot uninstall requirement jupyter, not installed
$ which jupyter
/usr/local/bin/jupyter
我该怎么做才能删除这个 jupyter?
编辑 之后:sudo pip3 uninstall jupyter-client jupyter-console jupyter-core 我已经卸载了这 3 个包,但仍然剩下 (2xTab):
$ jupyter-
jupyter-bundlerextension jupyter-nbconvert jupyter-nbextension jupyter-notebook jupyter-qtconsole jupyter-serverextension jupyter-trust
pip 说他们不在那里:
$ pip3 freeze | grep jupyter
$ pip freeze | grep jupyter
当我尝试删除其中任何一个时,我得到了相同的结果,例如:
sudo -H pip uninstall jupyter-notebook
Cannot uninstall requirement jupyter-notebook, not installed
那么如何完全删除这些包呢?
请您参考如下方法:
如果您尝试卸载 jupyter,因为 jupyter 在运行 jupyter notebook 时抛出以下错误
zsh:/usr/local/bin/jupyter: 错误的解释器:/usr/local/opt/python/bin/python3.6: 没有那个文件或目录,
您可以使用以下命令在不卸载 jupyter 的情况下修复该问题
Python3 : pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
Python2 : pip install --upgrade --force-reinstall --no-cache-dir jupyter
引用:https://github.com/jupyter/jupyter_core/issues/127
以上步骤在 Mac 中对我有用
