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

假装没事ソ 提交于 2019-11-26 10:58:32

问题


Trying to install spyder using pip:

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.


回答1:


You can upgrade ipython without uninstall the old version

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



回答2:


Just solved with:

sudo apt-get remove ipython



回答3:


For Python 2:

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

For Python 3:

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



回答4:


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

sudo apt-get remove python-ipython

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

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

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.



来源:https://stackoverflow.com/questions/50421287/pip-cannot-uninstall-ipython-it-is-a-distutils-installed-project-and-thus-w

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!