deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

python3.11 ubuntu jammy missing ensurepip or pip #223

Closed ssbarnea closed 2 years ago

ssbarnea commented 2 years ago

description

I discovered that I do not have neither pip or ensure pip on the py311 version coming from deadsnakes repo, so I am not really sure how we can make use of it.

os information

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:    22.04
Codename:   jammy

uname -a


Linux u1 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:57:22 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux```

Any hints on how to make it work would be really appreciated, especially as debian/ubuntu does not seem to be very keen on including the entire stdlib, [ensurepip](https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1955729) in particular.

As a side note, I was able to use python3.11 from Fedora 36 main repositories without any problems, it did include ensurepip and pip. Sadly, for GHA, we need to use Ubuntu.

And thanks for maintaining deadsnakes!
asottile commented 2 years ago

ensurepip is available if you pull in the -venv package and pip is available through python3-pip

that said, using global pip is a bad idea -- make a virtualenv

in the future please search the issue tracker, there's 10s of duplicates for either "pip" or "ensurepip"

ssbarnea commented 2 years ago

Sorry for the noise, I did the search but seen a couple of old tickets but it was not clear from them that Debian decided to hide ensurepip module, part of stdlib, in another venv package.

The correct package name for install ensure on py311 is python3.11-venv not python3-venv, as that one would install it for system python which is 3.10.

I also discovered that installing python3.11-full also includes venv but the headers, so I am inclined to believe that people doing testing should do apt install python3.11-full python-3.11-devel, or you would risk not being able to compile some modules when installing, especially as very few packages already published binary wheels for 3.11, especially if arch is not amd64.

I wonder if it would not worth mentioning this inside the docs and maybe even the "new issue template". To install full-python install "pythonX.Y-full pythonX.Y-dev` packages as by default some bits of Python stdlib are not included in the minimal implicit package. If it does make sense, let me know to make a PR to add it, hopefully will reduce the change of duplicate similar bugs.

asottile commented 2 years ago

that is in the docs, but it appears you didn't read them