【发布时间】:2017-09-22 20:40:34
【问题描述】:
我正在尝试卸载 jupyter。
pip uninstall jupyter,它给了我这个错误:
Cannot uninstall requirement jupyter, not installed
但是which jupyter 说
/usr/local/bin/jupyter
我尝试使用pip install pip-autoremove,然后使用pip-autoremove jupyter -y,但出现了这个错误:
Traceback (most recent call last):
File "/usr/local/bin/pip-autoremove", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/pip_autoremove.py", line 109, in main
autoremove(args, yes=opts.yes)
File "/Library/Python/2.7/site-packages/pip_autoremove.py", line 21, in autoremove
dead = list_dead(names)
File "/Library/Python/2.7/site-packages/pip_autoremove.py", line 28, in list_dead
start = set(map(get_distribution, names))
File "/Users/<username>/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 562, in get_distribution
dist = get_provider(dist)
File "/Users/<username>/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 436, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/Users/<username>/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 981, in require
needed = self.resolve(parse_requirements(requirements))
File "/Users/<username>/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 867, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'jupyter' distribution was not found and is required by the application
编辑
更新问题以包含pip list的输出
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
jupyter-client (5.1.0)
jupyter-console (5.2.0)
jupyter-core (4.3.0)
【问题讨论】:
-
你能查一下
pip list吗?或pip list | grep jupyter会返回任何结果。 -
是 @bhansa 弃用:默认格式将在未来切换到列。您可以使用 --format=(legacy|columns) (或在 [list] 部分下的 pip.conf 中定义 format=(legacy|columns) )来禁用此警告。 jupyter-client (5.1.0) jupyter-console (5.2.0) jupyter-core (4.3.0)
-
你可以试试
pip uninstall jupyter-*吗? -
您找到解决方案了吗?我面临同样的问题
-
不.. 没用过