无法卸载要求jupyter,未安装

时间:2017-10-29 14:09:56

标签: python pip jupyter

我已安装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

那么如何完全删除这些包呢?

2 个答案:

答案 0 :(得分:1)

您提到的脚本由名为notebook的pip包提供,它可以作为jupyter元数据包的一部分安装,但也可以单独安装。尝试

sudo -H pip uninstall notebook

答案 1 :(得分:0)

如果您尝试卸载jupyter是因为在运行jupyter笔记本时jupyter抛出以下错误
zsh: /usr/local/bin/jupyter: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory

您可以使用以下命令在不卸载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中,以上步骤对我有用

相关问题