我创建了一个conda环境,用于安装所需的所有东西。
我已经安装了pandas
库,但是我需要将其升级到最新版本。
但是,当我尝试pip3 install --upgrade pandas
时,出现以下错误:
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.
我尝试过sudo apt-get remove pandas
,但是这使我收到一条消息,提示找不到熊猫包。
如果相关,我在Ubuntu 16.04中并使用python 3.6.3
答案 0 :(得分:2)
尽管我无法重现该错误,但是您可以尝试:
1)缩小版本
pip install --upgrade --force-reinstall pip==18.0
尝试重新安装软件包
pip install xxx --disable-pip-version-check
最后,恢复pip的最新版本
pip install --upgrade pip
2)pip install -I==18.0 -r requirements.txt
3)尝试从“站点包”中手动删除
找到了这些解决方案here