Title: Pass --default-install to ensurepip in the Windows installers
Type: enhancement Stage: resolved
Components: Installation Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: Marcus.Smith, dstufft, larry, loewis, ncoghlan, paul.moore, python-dev
Priority: release blocker Keywords: patch

Created on 2014-02-09 00:08 by ncoghlan, last changed 2014-03-17 06:30 by python-dev. This issue is now closed.

File name Uploaded Description Edit
issue20568_install_unversioned_pip_on_Windows.diff ncoghlan, 2014-02-14 09:47 Change to installer command review
Messages (14)
msg210705 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-02-09 00:08
Installing 3.4b3 on Windows to test issue 20053, I was surprised to find that after installation, "pip install <package>" didn't work.

I had forgotten that due to the flat executable namespace on POSIX systems, we only install pip3 and pip3.4 by default - you have to pass "--default-install" to ensurepip to get it to install the unqualified "pip".

For virtual environments, we handle that in the venv module - it passes "--default-pip" when invoking the ensurepip CLI.

Given that Windows uses "python" for both Python 2 & 3 (in contrast to the POSIX python/python3 and python2/python3 conventions), perhaps we should be passing --default-install to ensurepip in the Windows installers as well?
msg210729 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2014-02-09 08:54
I had not noticed that, but yes. It would be unreasonable on Windows to install pip3 and pip3.4 but not plain pip. So +1 on this change.

(In fact, on Windows, omitting the versioned names would conform more closely to how Python is installed, but it's not something that's worth losing sleep over).
msg211207 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-02-14 09:47
Martin, the addition of "--default-install" to the ensurepip args is all that should be needed (it won't trigger if pip isn't upgraded, but rc2 will contain 0.15.3 to fix a couple of glitches that remained in rc1)
msg211696 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2014-02-20 06:17
Martin?  Do you concur?
msg212087 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-02-24 12:19
This was still missing from rc2 - this is a *serious* usability issue on Windows and needs to be fixed before 3.4 final.

POSIX already has the python/python3 convention, so extending that to pip is reasonable. Windows has no such convention, and the "pip3" naming is just confusing there. We need to install "pip" as well.
msg212088 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-02-24 12:21
And if that means we need an rc3, then we should *absolutely* do one. It's that important.
msg212143 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-02-24 21:18
While it occurs to me that changing ensurepip's default behaviour on
Windows is likely a better long term (3.5+) solution, I think passing the
option in the installer is still the better near term (3.4 rc3/final)
msg212427 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-02-28 13:18
Sorry, I had not noticed this issue so far. The patch looks fine, please apply.
msg212430 - (view) Author: Roundup Robot (python-dev) Date: 2014-02-28 13:37
New changeset ec42ab5e0cb3 by Nick Coghlan in branch 'default':
Close #20568: install unversioned pip command on Windows
msg212567 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 18:07
Unfortunately, the patch was incorrect. The option is called --default-pip, not --default-install (the patch had it right, but the committed change is wrong). As a consequence, the installer currently completely fails, as the unrecognized option causes a rollback of the entire Python installation.
msg212569 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-02 18:16
New changeset 16f91d87ff39 by Martin v. Löwis in branch 'default':
Issue #20568: Fix typo in pip option.
msg212571 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2014-03-02 18:18
cherry-picking in issue20830
msg212590 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-03-02 21:14
Thanks Martin - my apologies for retyping the change (and introducing the
error) rather than just applying the patch (I had assumed, perhaps
incorrectly, that wouldn't apply cleanly due to the UAC changes, but
obviously didn't properly check the retyped version against the original
msg213800 - (view) Author: Roundup Robot (python-dev) Date: 2014-03-17 06:30
New changeset 5d190cca2f47 by Nick Coghlan in branch '3.4':
Close #20568: install unversioned pip command on Windows

New changeset 3f8ca67bde4d by Martin v. Löwis in branch '3.4':
Issue #20568: Fix typo in pip option.
Date User Action Args
2014-03-17 06:30:45python-devsetmessages: + msg213800
2014-03-02 21:14:08ncoghlansetmessages: + msg212590
2014-03-02 18:18:35loewissetstatus: open -> closed

messages: + msg212571
2014-03-02 18:16:34python-devsetmessages: + msg212569
2014-03-02 18:07:36loewissetstatus: closed -> open

messages: + msg212567
2014-02-28 13:37:47python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg212430

resolution: fixed
stage: commit review -> resolved
2014-02-28 13:18:41loewissetmessages: + msg212427
2014-02-24 21:18:48ncoghlansetmessages: + msg212143
2014-02-24 12:21:00ncoghlansetmessages: + msg212088
2014-02-24 12:19:55ncoghlansetmessages: + msg212087
2014-02-20 06:17:40larrysetmessages: + msg211696
2014-02-14 09:47:01ncoghlansetfiles: + issue20568_install_unversioned_pip_on_Windows.diff
messages: + msg211207

assignee: ncoghlan -> loewis
keywords: + patch
stage: needs patch -> commit review
2014-02-13 21:41:09ncoghlanlinkissue20139 superseder
2014-02-13 21:40:22ncoghlansetpriority: deferred blocker -> release blocker
assignee: ncoghlan
title: Pass --default-install to ensurepip in the Windows installers? -> Pass --default-install to ensurepip in the Windows installers
2014-02-09 08:54:37paul.mooresetmessages: + msg210729
2014-02-09 04:31:29ncoghlansetnosy: + Marcus.Smith
2014-02-09 00:08:05ncoghlancreate