无法删除与jupyter相关的包

时间:2017-10-29 15:02:00

标签: python pip jupyter

我要删除以下软件包(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 pip3 uninstall jupyter-notebook
Cannot uninstall requirement jupyter-notebook, not installed

但是例如:

$ which jupyter-notebook 
/usr/local/bin/jupyter-notebook

那么如何删除这些包?

2 个答案:

答案 0 :(得分:1)

运行以下命令

pip3 show jupyter

它会提供一些输出,如

Name: jupyter
Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter@googlegroups.org
License: BSD
Location: /usr/local/lib/python3.5/dist-packages
Requires: ipykernel, ipywidgets, qtconsole, jupyter-console, notebook, nbconvert

现在在剪贴板上复制输出中Require的值,这是jupyter

所需的包

然后运行以下命令

sudo pip3 uninstall -y jupyter [paste the copied content ]

这相当于

sudo pip3 uninstall -y jupyter ipykernel ipywidgets qtconsole jupyter-console notebook nbconvert

确保在粘贴内容后删除包名称之间的逗号

答案 1 :(得分:1)

'''你说你必须删除的实际上是脚本,大多数(全部?)由名为in.readString()的pip包提供。通常,notebook包作为名为notebook的元数据包的依赖项安装(如另一个答案所示),但也可以在没有它的情况下安装。我建议你尝试(按照你已列出的jupyter等)

sudo