【问题标题】:Cannot uninstall requirement jupyter, not installed无法卸载需求 jupyter,未安装
【发布时间】:2017-10-29 14:09:55
【问题描述】:

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

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

【问题讨论】:

  • 试试pip3 uninstall jupyter-client jupyter-console jupyter-core
  • 没有安装一个名为“jupyter”的软件包。正如您的 grep 所示,您需要卸载 jupyter-core
  • @jdoe 它只删除了 3 个包,但没有删除所有 pip 仍然看不到的与 Jupyter 相关的包。我已将新的进行编辑,请参阅。如何也删除它们?
  • @Iguananaut 你是对的,但仍然有一些与 jupyter 相关的包,无法删除它们。你能看看我对原帖的编辑吗?

标签: python pip jupyter


【解决方案1】:

如果您尝试卸载 jupyter,因为 jupyter 在运行 jupyter notebook 时抛出错误
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 中对我有用

【讨论】:

    【解决方案2】:

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

    sudo -H pip uninstall notebook
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-03
      • 2018-02-09
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      • 2014-01-31
      • 2017-07-04
      • 2013-09-08
      相关资源
      最近更新 更多