Cannot uninstall 'pandas' (distutils installed project)

帅比萌擦擦* 提交于 2019-12-11 15:48:44

问题


I have created a conda environment where I am installing all the stuff I need.

I already had installed the pandas library, but I need to upgrade it to the latest version.

However, when I try pip3 install --upgrade pandas I get the following error:

  Found existing installation: pandas 0.15.2
Cannot uninstall 'pandas'. 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.

I have tried sudo apt-get remove pandas, but this get me a message saying that the pandas package cannot be found.

In case is relevant, I am in Ubuntu 16.04 and using python 3.6.3


回答1:


Though I'm unable to reproduce the error, you can try:

1) Reduce version

pip install --upgrade --force-reinstall pip==18.0

Try to re-install package

pip install xxx --disable-pip-version-check

At last, recover the latest version for pip

pip install --upgrade pip

2) pip install -I==18.0 -r requirements.txt

3) Try removing manually from 'site-packages'

These solutions were found here



来源:https://stackoverflow.com/questions/51877505/cannot-uninstall-pandas-distutils-installed-project

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