This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Python 2.7.12 windows x64 installer fails after previous bad uninstall
Type: behavior Stage: resolved
Components: Installation Versions: Python 2.7
Status: closed Resolution: duplicate
Dependencies: Superseder: Hide pip install/uninstall windows in setup
View: 27888
Assigned To: Nosy List: Igor.Skochinsky, loewis, steve.dower, terry.reedy
Priority: normal Keywords:

Created on 2016-11-14 10:38 by Igor.Skochinsky, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg280747 - (view) Author: Igor Skochinsky (Igor.Skochinsky) Date: 2016-11-14 10:38
It's somewhat my fault but I think it's not such an uncommon scenario.
I had installed 2.7.10 x64 some time ago into C:\Python27_64 but then had to delete it to save space. Rather foolishly instead of using the uninstaller, I just trashed the directory and now I have a problem: neither the Control Panel uninstall item, nor the fresh 2.7.12 installer work. The latter fails when it tries to use the nonexisting Python to remove pip:
MSI (s) (04:B0) [11:00:09:881]: Product: Python 2.7.10 (64-bit) -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: RemovePip, location: C:\Python27_64\python.exe, command: -B -m ensurepip._uninstall 
In the UI just the first message is shown, without the failed commandline, so it's not at all clear what went wrong.

I think at the very least the user should be informed about the failed command so they can clean up the old installer's remains, or maybe the installation should be allowed to proceed anyway, replacing the bad paths in the registry.

In the end, I had to use "Msizap TWA {E2B51919-207A-43EB-AE78-733F9C6797C3}" after which I could install 2.7.12 into a separate directory
msg281158 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-11-18 18:53
I had something like this happen with early 3.y.z.  I believe I re-downloaded and re-installed the old version before either uninstalling or upgrading.  I now keep the installer for x.y.z around until it is deleted or replaced.  (I don't now if this is still needed for the 3.5+ non-msi installers.)

I don't know how easy it would be to make a change as the author/maintainer of the msi installers is not currently active.
msg281163 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-11-18 20:22
So the fix for pre-2.7.13 here is to Repair first and then reinstall. 

But we've actually fixed this for 2.7.13 by making the pip uninstall step non-vital (the work was sponsored by Microsoft because it affects the Visual Studio installer). See issue27888 for the change.
msg281164 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-11-18 20:23
> to Repair first and then reinstall

Repair and then *un*install (obviously).
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72873
2016-11-18 20:23:01steve.dowersetmessages: + msg281164
2016-11-18 20:22:29steve.dowersetstatus: open -> closed
superseder: Hide pip install/uninstall windows in setup
messages: + msg281163

resolution: duplicate
stage: resolved
2016-11-18 18:53:53terry.reedysetnosy: + loewis, terry.reedy, steve.dower
messages: + msg281158
2016-11-14 10:38:47Igor.Skochinskycreate