PYWIN32通过 pip 升级 -- 错误无法卸载...由Distutils安装..."



既然 pywin32 在 pip 中可用,那么从早期(本机 MSI 安装(版本升级到最新和最好的 PIP 版本的顺利途径是什么?

我的 PIP 不会卸载旧版本,如下所述。

======= C:Usersbobhy
> pip list
Package         Version
--------------- -------
. . .
pip             10.0.1
pywin32         221
. . .
======= C:Usersbobhy
> pip install pywin32==223
Collecting pywin32==223
Using cached https://files.pythonhosted.org/packages/9f/9d/f4b2170e8ff5d825cd4398856fee88f6c70c60bce0aa8411ed17c1e1b21f/pywin32-223-cp36-cp36m-win_amd64.whl
Installing collected packages: pywin32
Found existing installation: pywin32 221
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.

我遇到了类似的问题:pywin32来自ActivePython,我正在尝试(不成功(从pip安装另一个模块(win10toast(并且该模块依赖于pywin32

安装有同样的问题。

解决方案是添加--ignore-installed

pip install win10toast --ignore-installed 

干杯

解决方案是通过Control Panel > Uninstall or Change Program卸载 MSI 安装。之后,您可以通过pip.

最新更新