如何使用Pycharm Community 2017卸载pywin32

时间:2018-10-04 09:40:26

标签: python pip pycharm pywin32 distutils

我有必要卸载为我的python项目安装的pywin32的现有版本。当我使用pycharm GUI进行卸载"AttributeError: 'module' object has no attribute 'main'"时,提示错误,并建议我使用PIP(pip uninstall pywin32)进行卸载。

使用PIP时,提示以下消息。

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

任何指导我进行卸载的帮助将不胜感激。

致谢 Chalinga

1 个答案:

答案 0 :(得分:0)

基本上,如果您(或您使用的某些基础结构)使用“ distutils”安装了pywin32,则需要“使用distutils”来管理(尤其是)将其卸载,因为pip无法正确地卸载“ pure” distutils安装的软件包,因为distutils记录的元数据不足以进行pip记录。不幸的是distutils不包含卸载命令,因此“使用distutils卸载”意味着手动删除软件包。

您可以尝试在虚拟环境中手动从“站点软件包”中删除软件包。