首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何卸载jupyter

如何卸载jupyter
EN

Stack Overflow用户
提问于 2015-10-10 17:07:44
回答 11查看 243.3K关注 0票数 81

我一直在尝试卸载jupyter

我已经尝试了以下命令

代码语言:javascript
复制
pip uninstall jupyter
pip3 uninstall jupyter

代码语言:javascript
复制
rm -rf /Users/$user/Library/Jupyter/*

即使在运行完所有这些命令之后,当我在终端中输入jupyter时,也会得到以下消息

代码语言:javascript
复制
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
               [--paths] [--json]
               [subcommand]
jupyter: error: one of the arguments --version subcommand --config-dir --data-dir --runtime-dir --paths is required

到底是什么地方出了问题,为什么我仍然可以使用该命令?

EN

回答 11

Stack Overflow用户

发布于 2018-10-21 13:02:04

如果您不想使用pip-autoremove (因为它删除了在其他包之间共享的依赖项),并且pip3 uninstall jupyter只删除了一些包,则执行以下操作:

复制-粘贴:

根据您的需要,可能需要sudo

代码语言:javascript
复制
python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console jupyterlab_pygments notebook qtconsole nbconvert nbformat jupyterlab-widgets nbclient

注意:

上面的命令只卸载特定于jupyter的软件包。我没有添加要卸载的其他包,因为它们可能会在其他包之间共享(例如:Flask使用Jinja2ipython是一组单独的包本身,tornado也可能被其他人使用)。

在任何情况下,下面都提到了所有依赖项(截至2020年11月21日。jupyter==4.4.0 )

如果您确定要删除所有依赖项,则可以使用的答案。

代码语言:javascript
复制
argon2-cffi
async-generator
attrs
backcall
bleach
cffi
decorator
defusedxml
entrypoints
importlib-metadata
ipykernel
ipython
ipython-genutils
ipywidgets
jedi
Jinja2
jsonschema
jupyter
jupyter-client
jupyter-console
jupyter-core
jupyterlab-pygments
jupyterlab-widgets
MarkupSafe
mistune
nbclient
nbconvert
nbformat
nest-asyncio
notebook
packaging
pandocfilters
parso
pexpect
pickleshare
prometheus-client
prompt-toolkit
ptyprocess
pycparser
Pygments
pyparsing
pyrsistent
python-dateutil
pyzmq
qtconsole
QtPy
Send2Trash
six
terminado
testpath
tornado
traitlets
typing-extensions
wcwidth
webencodings
widgetsnbextension
zipp

执行编辑:

代码语言:javascript
复制
pip3 uninstall jupyter
pip3 uninstall jupyter_core
pip3 uninstall jupyter-client
pip3 uninstall jupyter-console
pip3 uninstall jupyterlab_pygments
pip3 uninstall notebook
pip3 uninstall qtconsole
pip3 uninstall nbconvert
pip3 uninstall nbformat

每种方法的说明:

  1. 卸载jupyter dist-packages:

pip3 uninstall jupyter

  1. 卸载jupyter_core dist-packages (还会卸载以下二进制文件:jupyterjupyter-migratejupyter-troubleshoot):

pip3 uninstall jupyter_core

卸载jupyter-clientpip3 uninstall jupyter-client

卸载jupyter-consolepip3 uninstall jupyter-console

  1. 卸载jupyter-notebook (它还会卸载以下二进制文件:jupyter-bundlerextensionjupyter-nbextensionjupyter-notebookjupyter-serverextension):

pip3 uninstall notebook

  1. 卸载jupyter-qtconsole

pip3 uninstall qtconsole

卸载jupyter-nbconvertpip3 uninstall nbconvert

卸载jupyter-trustpip3 uninstall nbformat

票数 96
EN

Stack Overflow用户

发布于 2016-07-17 06:21:08

当您$ pip install jupyter时,安装了几个依赖项。完全卸载它的最好方法是运行以下命令:

  1. $ pip install pip-autoremove
  2. $ pip-autoremove jupyter -y

请参考相关的question

pip-autoremove删除包及其未使用的依赖项。这是docs

票数 77
EN

Stack Overflow用户

发布于 2018-08-10 01:11:35

试试pip uninstall jupyter_core。详细信息如下:

当我的jupyter笔记本只显示Python 2笔记本时,我遇到了类似的问题。(没有Python 3笔记本)

我尝试卸载jupyter by pip unistall jupyterpi3 uninstall jupyter和建议的pip-autoremove jupyter -y

什么都不管用。我运行了which jupyter,得到了/home/ankit/.local/bin/jupyter

文件/home/ankit/.local/bin/jupyter只是一段简单的python代码:

代码语言:javascript
复制
#!/usr/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from jupyter_core.command import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

已尝试通过pip uninstall jupyter_core卸载模块jupyter_core,但它正常工作。

pip3 install jupyter重新安装了jupyter,一切都恢复正常。

票数 17
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33052232

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档