我一直在尝试卸载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
到底是什么地方出了问题,为什么我还能使用这个命令?
当你$ pip install jupyter
时,会安装几个依赖项。完全卸载它的最好方法是运行:
$ pip install pip-autoremove
。$ pip-autoremove jupyter -y
。请参考这个相关的问题。
pip-autoremove
删除一个软件包及其未使用的依赖项。这里是文档。
试试pip uninstall jupyter_core
。详情如下:
我遇到了一个类似的问题,我的jupyter笔记本只显示Python 2笔记本。(没有Python 3的笔记本)
我尝试用pip unistall jupyter
、pi3 uninstall jupyter
和建议的pip-autoremove jupyter -y
来卸载jupyter。
没有任何作用。我运行了which jupyter
,得到/home/ankit/.local/bin/jupyter
。
文件/home/ankit/.local/bin/jupyter
只是一个简单的python代码:
#!/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,一切都恢复正常了。