如何卸载jupyter

新手上路,请多包涵

我一直在尝试卸载 jupyter

我尝试了以下命令

pip uninstall jupyter
pip3 uninstall jupyter

rm -rf /Users/$user/Library/Jupyter/*

即使在我在终端中键入 jupyter 时运行了所有这些命令后,我也会收到以下消息

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

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

原文由 jigar surana 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 1.2k
1 个回答

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

复制粘贴:

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

 python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console jupyterlab_pygments notebook qtconsole nbconvert nbformat jupyterlab-widgets nbclient

笔记:

上面的命令只会卸载 jupyter 特定的包。我没有添加其他要卸载的包,因为它们可能在其他包之间共享(例如: Jinja2Flask 使用, ipython 是一组单独的–他们自己, tornado 可能再次被其他人使用)。

无论如何,下面提到了所有依赖项(截至 2020 年 11 月 21 日 jupyter==4.4.0

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

 argon2-cffi
argon2-cffi-bindings
async-generator
attrs
backcall
bleach
cffi
dataclasses
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

执行编辑:

 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. Uninstall jupyter_core dist-packages (It also uninstalls following binaries: jupyter , jupyter-migrate , jupyter-troubleshoot ):

pip3 uninstall jupyter_core

  1. 卸载 jupyter-client

pip3 uninstall jupyter-client

  1. 卸载 jupyter-console

pip3 uninstall jupyter-console

  1. Uninstall jupyter-notebook (It also uninstalls following binaries: jupyter-bundlerextension , jupyter-nbextension , jupyter-notebook , jupyter-serverextension ):

pip3 uninstall notebook

  1. 卸载 jupyter-qtconsole

pip3 uninstall qtconsole

  1. 卸载 jupyter-nbconvert

pip3 uninstall nbconvert

  1. 卸载 jupyter-trust

pip3 uninstall nbformat

原文由 Rahul Bharadwaj 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题