python - PYWIN32 upgrade via pip -- Error cannot uninstall... installed by distutils...'

标签 python pip pywin32

既然 pywin32 在 pip 中可用,那么从早期(安装了 native 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.

最佳答案

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

安装有同样的问题。

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

 pip install win10toast --ignore-installed 

干杯

关于python - PYWIN32 upgrade via pip -- Error cannot uninstall... installed by distutils...',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51115764/

相关文章:

python - 用不同的语言对程序进行单元测试是否可以接受?

python - 在给定条件的情况下查找列表的最小和最大索引

python - 在 Homebrew Python 2.7 安装中升级 pip 的问题

python - 适用于 Windows SDK 的 iTunes COM 中的媒体种类

python - 如何将抓取的数据写入csv格式?

python - 你如何在 python 中进行长列表理解?

python - 通过 pip 将包安装到单独的目录

python - 有没有一种方法可以在不抓取的情况下从 PyPI 访问搜索结果?

python - 创建文件时找不到 Pywin32

python - 有没有办法在pywin32中解码数字COM错误代码