Now that pywin32 is available in pip, what's the smooth path for upgrading from an earlier (native MSI installed) version to the latest and greatest in PIP?
My PIP won't uninstall the older version, as noted below.
======= 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.
You have to do what pip uninstall is for pip install for your msi installation (which I think is uninstall manually). Downgrade pip to 9.0. 2 ( pip install "pip<10" ), uninstall pywin32 ( pip uninstall -y pywin32 ), restore pip to 10.0 ( pip install pip --upgrade ).
To use pip to uninstall a package locally in a virtual environment: Open a command or terminal window (depending on the operating system) cd into the project directory. pip uninstall <packagename>
pywin32 download and URL display. pywin32 install (an older version to test upgrade later) pip test. pywin32 test (list pywin32 version using pywin32)
I had a similar issue: pywin32
was coming from ActivePython and I was trying to (unsuccessfully) install another module (win10toast for what matters) from pip
and that that module has a dependency to pywin32
.
The installation had the same issue.
The solution was to add --ignore-installed
:
pip install win10toast --ignore-installed
Cheers
The solution is to uninstall the MSI installation via Control Panel > Uninstall or Change Program
. After that you can install via pip
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With