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

时间:2018-06-30 14:19:47

标签: python pip pywin32

现在pywin32可在pip中使用,从较早版本(安装了本地MSI)升级到PIP最新最大的平滑途径是什么?

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

======= C:\Users\bobhy
> pip list
Package         Version
--------------- -------
. . .
pip             10.0.1
pywin32         221
. . .

======= C:\Users\bobhy
> 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.

2 个答案:

答案 0 :(得分:3)

我有一个类似的问题:pywin32来自ActivePython,并且我试图(未成功)从pip安装另一个模块( win10toast 重要),并且该模块对pywin32有依赖性。

安装有相同的问题。

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

 pip install win10toast --ignore-installed 

欢呼

答案 1 :(得分:0)

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

相关问题