PIP:“无法卸载'ipython'。这是一个distutils安装的项目,因此我们无法准确确定......”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/50421287/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 19:29:42  来源:igfitidea点击:

PIP: "Cannot uninstall 'ipython'. It is a distutils installed project and thus we cannot accurately determine..."

pythonpipinstallationspyder

提问by Raphael

Trying to install spyderusing pip:

尝试使用以下方法安装spyderpip

pip install spyder

This error pops up:

弹出这个错误:

Cannot uninstall 'ipython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

无法卸载“ipython”。这是一个 distutils 安装的项目,因此我们无法准确确定哪些文件属于它,这只会导致部分卸载。

采纳答案by Raphael

Just solved with:

刚刚解决了:

sudo apt-get remove ipython

回答by 0xCC

You can upgrade ipython without uninstall the old version

您可以在不卸载旧版本的情况下升级 ipython

sudo -H pip install --ignore-installed -U ipython

回答by Hu Xixi

For Python 2:

对于 Python 2:

pip install --upgrade --force-reinstall --no-cache-dir Spyder

For Python 3:

对于 Python 3:

pip3 install --upgrade --force-reinstall --no-cache-dir Spyder

回答by vigilantbag2018

Some of the solutions listed may work, but this one solved my issue with distutils installed packages.

列出的一些解决方案可能有效,但这个解决了我使用 distutils 安装的软件包的问题。

sudo apt-get remove python-ipython

Depending on what type of package it is, you will need to provide the "python-" for python packages.

根据它是什么类型的包,你需要为 python 包提供“python-”。

Edit: However, if this still does not solve your question, you might want to consider downgrading pip to an earlier version as pip 10 does not allow removal of distutils packages

编辑:但是,如果这仍然不能解决您的问题,您可能需要考虑将 pip 降级到早期版本,因为 pip 10 不允许删除 distutils 包

sudo -H pip install pip==9.0.1
sudo pip uninstall ipython

Thank you for the comment, as I am looking to improve how I can help people.

感谢您的评论,因为我正在寻求改进我可以帮助人们的方式。