pip 安装模块报错 Cannot uninstall ‘entrypoints’ It is a distutils installed…

  • Post author:
  • Post category:其他

pip 18.1

有一次通过pip安装flake8模块时遇到报错

Cannot uninstall 'entrypoints'. 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.

error.png

是说有一个库现在版本不对,需要卸载重装,但是这个库是distutils安装的,不知道直接卸载能不能正确的卸载干净。

这时候如果你确信没问题,可以在pip命令后加上–ignore-installed表示忽略已经安装的库,直接整上新的。

pip install flake8 --ignore-installed

就可以了。


版权声明:本文为lnotime原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。