classification
Title: Windows Installer can sometimes silently fail pip stage
Type: Stage: resolved
Components: Windows Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Paul Hammant, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-01-15 03:54 by Paul Hammant, last changed 2018-09-20 16:57 by steve.dower. This issue is now closed.

Messages (8)
msg258266 - (view) Author: Paul Hammant (Paul Hammant) Date: 2016-01-15 03:54
It NEEDS to communicate more as to why it is rolling back the pip install (progress bar goes backwards, install fails).

Reasons can be:

1. older/wrong versions of Python listed in the PATH - eg c:\Python27 encountered when c:\Python34 is being installed. User should redo PATH env-var.

2. PYTHONPATH similarly set to the wrong thing. User should delete PYTHONPATH env-vars.

3. Incompatible Python installed. User should uninstall other Python's first.

The windows install does not have to silently fail on the pip piece. It can do more to inform them end-user, and not drive them off to stackoverflow.
msg258271 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-01-15 06:26
Do you have any evidence of it failing for those reasons? The command used is specifically crafted to prevent those issues.

I'm not saying there aren't potentially other issues that would be nice to surface (though fairly difficult without modifying a complex piece of third party software), but I don't know that those are the reasons.
msg258350 - (view) Author: Paul Hammant (Paul Hammant) Date: 2016-01-16 03:36
Steve, if you want I can attempt to reproduce this. Maybe I'll take a video of the reproduction.
msg258353 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-01-16 04:40
The log files will be sufficient. You'll find them in your %TEMP% directory - there'll be around 20 text files, so put them in a zip and upload them here.
msg258524 - (view) Author: Paul Hammant (Paul Hammant) Date: 2016-01-18 14:36
That's all the files in the %TEMP% dir beginning with Python* - right?
msg258555 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-01-18 22:19
Preferably just one group of them (created around the same time) for a failed installation.
msg259298 - (view) Author: Paul Hammant (Paul Hammant) Date: 2016-01-31 18:10
Chronalog for today, below. Status - can reproduce at will, can't produce %TEMP% files was for - there aren't any.

0. I deleted all Python prefixed files from %TEMP%

1. I uninstalled Python 3.4 via it's windows installer. It progressed to completion. I noted after that there was still a C:\python34 directory with some remaining items in it. There was also still a PYTHONHOME environmental variable.

2. I installed Python 2.7 via it's canonical windows installer, and (as per this bug filing) it barfs, and then (with a couple of clicks from me) proceeds to undo the installation.

3. I've checked the %TEMP% folder. There's nothing in there with a matching timestamp, nor anything at all prefixed with 'Python'

4. If I redo #2 and explicitly de-select pip, the installation completes as expected.

5. If I uninstall (via the installer) and attempt to reinstall WITH pip, it barfs (as per this bug filing)

6. If I delete the PYTHONHOME env-var and attempt, it works.

Conclusion - Pip aspect of WindowsInstaller gets caught out on presence of erroneous PYTHONHOME. It does so for Python 2.7.x replaceing and Python 3.5.x or the opposite order.
msg259309 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-02-01 04:01
It's not clear which version of Python you are having trouble with, but it apparently isn't 3.5.

The PYTHONHOME variable is never set or modified by our installers, but some earlier versions may be affected by it. We recommend never setting environment variables globally - only in the command prompt when you're about to use them.

If the issue is with 3.4, it won't get fixed. Future releases of that branch will not come with builds for Windows.

Once you've cleared the stray variable, please let us know if you have trouble with 2.7 and/or 3.5.
History
Date User Action Args
2018-09-20 16:57:55steve.dowersetstatus: open -> closed
resolution: out of date
stage: resolved
2016-02-01 04:01:25steve.dowersetmessages: + msg259309
2016-01-31 18:10:28Paul Hammantsetmessages: + msg259298
2016-01-18 22:19:10steve.dowersetmessages: + msg258555
2016-01-18 14:36:59Paul Hammantsetmessages: + msg258524
2016-01-16 04:40:57steve.dowersetmessages: + msg258353
2016-01-16 03:36:27Paul Hammantsetmessages: + msg258350
2016-01-15 06:26:10steve.dowersetmessages: + msg258271
2016-01-15 03:54:11Paul Hammantcreate