无法删除jupyter相关的包

2024-06-14 13:24:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我要删除以下程序包(2xTab):

$ jupyter-
jupyter-bundlerextension  jupyter-nbconvert         jupyter-nbextension       jupyter-notebook          jupyter-qtconsole         jupyter-serverextension   jupyter-trust 

皮普说他们不在那里:

^{pr2}$

当我试着移除其中任何一个的时候,我得到了相同的结果,例如:

sudo -H pip3 uninstall jupyter-notebook
Cannot uninstall requirement jupyter-notebook, not installed

但例如:

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

那么如何移除这些包裹呢?在


Tags: 程序包pip3sudojupyterrequirementnbextensionnotebookuninstall
2条回答

运行以下命令

pip3 show jupyter

它会产生一些输出

^{pr2}$

现在在剪贴板上复制Require in output的值,这是jupyter所需的包

然后运行以下命令

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

相当于

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

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

你说你必须删除的“包”实际上是脚本,大部分(全部?)其中由名为notebook的pip包提供。通常,notebook包作为名为jupyter的元包的依赖项进行安装(如另一个答案中所建议的),但也可以不安装它。我建议你试试(下面是你已经列出的sudo等)

sudo -H pip3 uninstall notebook

相关问题 更多 >