Missing package python3.7-pip

Bug #1800723 reported by garyo on 2018-10-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-pip (Ubuntu)
python3-defaults (Ubuntu)

Bug Description

There appears to be no way to get "pip" or "python3.7 -m pip" to work after installing python3.7 using "apt install python3.7". I expected to be able to install a "python3.7-pip" package similar to the other "python3.7-*" packages but I couldn't find one.

This problem appears in a clean install of 18.04 as well as 18.10.

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1800723/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting.

The python3 package contains a pip3 binary which might be what you are looking for. If not, I think we need some more details on what you attempt to do and what exactly is missing or not working as expected.

affects: ubuntu → python3.7 (Ubuntu)
affects: pip (Ubuntu) → python-pip (Ubuntu)
Changed in python3.7 (Ubuntu):
status: New → Incomplete
Changed in python-pip (Ubuntu):
status: New → Incomplete
tags: added: bionic cosmic
garyo (garyo) wrote :

The python3 package is python 3.6. It does contain pip3 (for python 3.6 of course, so not useful in my case). The python3.7 package has no pip or pip3.
What I attempted to do:
  apt install python3.7
  pip3 --version
What is missing? pip/pip3
What did I expect? The python3.7 package, or perhaps a package "python3.7-pip" (which doesn't exist), should install a version of pip or pip3 which works with python 3.7.

BTW I would be glad to file this bug under a particular package, but I don't know exactly where, given that I think the correct answer is there should be a _new_ package, python3.7-pip.

Hans Joachim Desserud (hjd) wrote :

I'm sorry, I messed up above. The pip3 binary is part of the python3-pip package. In other words pip is package separately from python. (Or pip3/python3 as in this case)

sudo apt install python3-pip
pip3 --version
should work. Hope this helps :)

I don't know the details around the package, but would assume python3-pip will use whichever python3 version you happen to have installed, including 3.7.

garyo (garyo) wrote :

That (python3-pip) does install pip3, but it also installs all of python3.6. Also, the pip3 it installs is by default set up for python3.6 (/usr/bin/python3), sadly.

On a clean machine:
# apt install python3.7 python3-pip
# pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

However: it turns out that package _does_ install the pip module in /usr/lib/python3/dist-packages/pip, and python3.7 is configured to look there for packages, so editing /usr/bin/pip3 to point to /usr/bin/python3.7 does cause pip3 to work with python3.7.

So it's almost there, except (1) it requires editing the script and (2) it installs all of python3.6 needlessly.

(BTW, it seems neither python3.7 nor python3 sets up /etc/alternatives for providing python or python3. That may be by design, I don't know.)

garyo (garyo) wrote :

Also once python3-pip is installed, "python3.7 -mpip --version" works. So it's really not terrible, it's just that all of python3.6 is needlessly installed.

Hans Joachim Desserud (hjd) wrote :

Ok, I see.

Python3-pip [1] depends on python3, which is pointing at the default python3 version. In Ubuntu at the moment, this is 3.6. Presumably at some point in the future the default will be changed to 3.7, and then any packages using python3 will install that instead.

I am not sure if this will retroactively happen for older Ubuntu releases.

[1] https://packages.ubuntu.com/bionic/python3-pip

affects: python3.7 (Ubuntu) → python3-defaults (Ubuntu)
Changed in python3-defaults (Ubuntu):
status: Incomplete → New
Changed in python-pip (Ubuntu):
status: Incomplete → New
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers