pip3 installs under python3.5

Bug #1518023 reported by Régis L.
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)
Fix Released
High
Barry Warsaw
Wily
Fix Released
High
Barry Warsaw
Xenial
Fix Released
High
Barry Warsaw

Bug Description

On a freshly installed and updated xubuntu 15.10, /usr/bin/python3 links to /usr/bin/python3.4

However, pip3 (from repository) installs packages under python3.5

Fix: Either change the symlink (it may break some pre-python 3.5 code in the distro though) or the first line of pip.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: python3 3.4.3-4ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
Uname: Linux 4.2.0-16-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Nov 19 15:36:29 2015
InstallationDate: Installed on 2015-11-19 (0 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: python3-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Régis L. (regis-lachaume) wrote :
Matthias Klose (doko)
affects: python3-defaults (Ubuntu) → python-pip (Ubuntu)
Changed in python-pip (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Barry Warsaw (barry) wrote :

I've confirmed that the shebang for /usr/bin/pip3 is /usr/bin/python3.5 where it should be /usr/bin/python3 and that affects where pip3 will install things by default. I should mention that in the face of multiple supported versions of Python 3, "pip3" is ambiguous anyway, and you might want to use `python3.4 -m pip install` to be explicit. Still, pip3 by default should install in the default Python 3.

(Aside: note that upstream pip is trying to break the link between the shebang and where things get installed. That won't help for Wily though. Also, this isn't Xubuntu specific).

Changed in python-pip (Ubuntu):
status: New → Confirmed
milestone: none → wily-updates
summary: - xubuntu 15.10: python3 links to python3.4 but pip3 installs under
- python3.5
+ pip3 installs under python3.5
Changed in python-pip (Ubuntu Wily):
status: New → Confirmed
assignee: nobody → Barry Warsaw (barry)
milestone: none → wily-updates
Revision history for this message
Barry Warsaw (barry) wrote :

Well, that's very interesting. I just built the source package on Wily and pip3's shebang is /usr/bin/python3. I'll do a bit more testing but maybe it just needs a no-change rebuild in Wily?

Revision history for this message
Barry Warsaw (barry) wrote :

I have a fix. Prepping SRU.

Revision history for this message
Barry Warsaw (barry) wrote :

The fix is to force `dh_python3 --shebang /usr/bin/python3` in d/rules.

Changed in python-pip (Ubuntu Xenial):
milestone: wily-updates → ubuntu-16.04
Changed in python-pip (Ubuntu Wily):
importance: Undecided → High
Changed in python-pip (Ubuntu Xenial):
importance: Undecided → High
tags: added: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pip - 1.5.6-7ubuntu2

---------------
python-pip (1.5.6-7ubuntu2) xenial; urgency=medium

  * d/rules: Force the shebang for /usr/bin/pip3 to be /usr/bin/python3.
    (LP: #1518023)

 -- Barry Warsaw <email address hidden> Thu, 19 Nov 2015 14:49:14 -0500

Changed in python-pip (Ubuntu Xenial):
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Régis, or anyone else affected,

Accepted python-pip into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-pip/1.5.6-7ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-pip (Ubuntu Wily):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Simon Ye (yesimon) wrote :

Just tested version 1.5.6-7ubuntu1.1 on wily-proposed and it works.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

I tested this also and it works for me. When will this get released to updates?

Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for python-pip has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-pip - 1.5.6-7ubuntu1.1

---------------
python-pip (1.5.6-7ubuntu1.1) wily; urgency=medium

  * d/rules: Force the shebang for /usr/bin/pip3 to be /usr/bin/python3.
    (LP: #1518023)

 -- Barry Warsaw <email address hidden> Thu, 19 Nov 2015 14:49:14 -0500

Changed in python-pip (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
John Hagen (johnthagen) wrote :

For users that want to use Python 3.5, now that this has been changed, what is the supported way to install pip for Python 3.5?

Revision history for this message
Simon Ye (yesimon) wrote : Re: [Bug 1518023] Re: pip3 installs under python3.5

You can probably use the update-alternatives system to set the system
python version to default to python 3.5. Otherwise it might be easier to
use user level tools such as virtualenv and pyenv to have multiple python
versions installed.

On Thu, Jan 7, 2016 at 10:05 AM John Hagen <email address hidden> wrote:

> For users that want to use Python 3.5, now that this has been changed,
> what is the supported way to install pip for Python 3.5?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1519474).
> https://bugs.launchpad.net/bugs/1518023
>
> Title:
> pip3 installs under python3.5
>
> Status in python-pip package in Ubuntu:
> Fix Released
> Status in python-pip source package in Wily:
> Fix Released
> Status in python-pip source package in Xenial:
> Fix Released
>
> Bug description:
> On a freshly installed and updated xubuntu 15.10, /usr/bin/python3
> links to /usr/bin/python3.4
>
> However, pip3 (from repository) installs packages under python3.5
>
> Fix: Either change the symlink (it may break some pre-python 3.5 code
> in the distro though) or the first line of pip.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 15.10
> Package: python3 3.4.3-4ubuntu1
> ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
> Uname: Linux 4.2.0-16-generic x86_64
> ApportVersion: 2.19.1-0ubuntu5
> Architecture: amd64
> CurrentDesktop: XFCE
> Date: Thu Nov 19 15:36:29 2015
> InstallationDate: Installed on 2015-11-19 (0 days ago)
> InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64
> (20151021)
> SourcePackage: python3-defaults
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1518023/+subscriptions
>

Revision history for this message
Scott Kitterman (kitterman) wrote :

Changing /usr/bin/python3 to point to /usr/bin/python3.5 on a 15.10 system is guaranteed to break things. Don't do that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.