++ sudo apt-get install -y software-properties-common
Reading package lists...
Building dependency tree...
Reading state information...
software-properties-common is already the newest version (0.99.22.7).
0 upgraded, 0 newly installed, 0 to remove and 132 not upgraded.
++ sudo -E add-apt-repository -y ppa:deadsnakes/ppa
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Get:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease [18.1 kB]
Hit:6 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:7 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 Packages [18.4 kB]
Hit:8 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Hit:9 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:10 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:11 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease
Get:12 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main Translation-en [4192 B]
Fetched 40.7 kB in 2s (23.4 kB/s)
Reading package lists...
Repository: 'deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ jammy main'
Description:
This PPA contains more recent Python versions packaged for Ubuntu.
Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk.
Update Note
===========
Please use this repository instead of ppa:fkrull/deadsnakes.
Reporting Issues
================
Issues can be reported in the master issue tracker at:
https://github.com/deadsnakes/issues/issues
Supported Ubuntu and Python Versions
====================================
- Ubuntu 20.04 (focal) Python3.5 - Python3.7, Python3.9 - Python3.11
- Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11
- Note: Python2.7 (all), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages.
Why some packages aren't built:
- Note: for focal, older python versions require libssl<1.1 so they are not currently built
- Note: for jammy, older python versions requre libssl<3 so they are not currently built
- If you need these, reach out to asottile to set up a private ppa
The packages may also work on other versions of Ubuntu or Debian, but that is not tested or supported.
Packages
========
The packages provided here are loosely based on the debian upstream packages with some modifications to make them more usable as non-default pythons and on ubuntu. As such, the packages follow debian's patterns and often do not include a full python distribution with just `apt install python#.#`. Here is a list of packages that may be useful along with the default install:
- `python#.#-dev`: includes development headers for building C extensions
- `python#.#-venv`: provides the standard library `venv` module
- `python#.#-distutils`: provides the standard library `distutils` module
- `python#.#-lib2to3`: provides the `2to3-#.#` utility as well as the standard library `lib2to3` module
- `python#.#-gdbm`: provides the standard library `dbm.gnu` module
- `python#.#-tk`: provides the standard library `tkinter` module
Third-Party Python Modules
==========================
Python modules in the official Ubuntu repositories are packaged to work with the Python interpreters from the official repositories. Accordingly, they generally won't work with the Python interpreters from this PPA. As an exception, pure-Python modules for Python 3 will work, but any compiled extension modules won't.
To install 3rd-party Python modules, you should use the common Python packaging tools. For an introduction into the Python packaging ecosystem and its tools, refer to the Python Packaging User Guide:
https://packaging.python.org/installing/
Sources
=======
The package sources are available at:
https://github.com/deadsnakes/
Nightly Builds
==============
For nightly builds, see ppa:deadsnakes/nightly https://launchpad.net/~deadsnakes/+archive/ubuntu/nightly
More info: https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-jammy.list
Adding key to /etc/apt/trusted.gpg.d/deadsnakes-ubuntu-ppa.gpg with fingerprint F23C5A6CF475977595C89F51BA6932366A755776
++ sudo apt-get install -y python3.7 python3.7-dev python3.7-venv
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
libpython3.7 libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib
python3.7-distutils python3.7-lib2to3 python3.7-minimal
The following NEW packages will be installed:
libpython3.7 libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib
python3.7 python3.7-dev python3.7-distutils python3.7-lib2to3
python3.7-minimal python3.7-venv
0 upgraded, 10 newly installed, 0 to remove and 132 not upgraded.
Need to get 13.6 MB of archives.
After this operation, 44.5 MB of additional disk space will be used.
Get:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.7-minimal amd64 3.7.17-1+jammy1 [608 kB]
Get:2 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7-minimal amd64 3.7.17-1+jammy1 [1837 kB]
Get:3 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.7-stdlib amd64 3.7.17-1+jammy1 [1864 kB]
Get:4 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.7 amd64 3.7.17-1+jammy1 [1653 kB]
Get:5 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.7-dev amd64 3.7.17-1+jammy1 [3981 kB]
Get:6 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7 amd64 3.7.17-1+jammy1 [362 kB]
Get:7 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7-dev amd64 3.7.17-1+jammy1 [500 kB]
Get:8 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7-lib2to3 all 3.7.17-1+jammy1 [124 kB]
Get:9 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7-distutils all 3.7.17-1+jammy1 [189 kB]
Get:10 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.7-venv amd64 3.7.17-1+jammy1 [2435 kB]
Fetched 13.6 MB in 8s (1644 kB/s)
Selecting previously unselected package libpython3.7-minimal:amd64.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 234223 files and directories currently installed.)
Preparing to unpack .../0-libpython3.7-minimal_3.7.17-1+jammy1_amd64.deb ...
Unpacking libpython3.7-minimal:amd64 (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7-minimal.
Preparing to unpack .../1-python3.7-minimal_3.7.17-1+jammy1_amd64.deb ...
Unpacking python3.7-minimal (3.7.17-1+jammy1) ...
Selecting previously unselected package libpython3.7-stdlib:amd64.
Preparing to unpack .../2-libpython3.7-stdlib_3.7.17-1+jammy1_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.17-1+jammy1) ...
Selecting previously unselected package libpython3.7:amd64.
Preparing to unpack .../3-libpython3.7_3.7.17-1+jammy1_amd64.deb ...
Unpacking libpython3.7:amd64 (3.7.17-1+jammy1) ...
Selecting previously unselected package libpython3.7-dev:amd64.
Preparing to unpack .../4-libpython3.7-dev_3.7.17-1+jammy1_amd64.deb ...
Unpacking libpython3.7-dev:amd64 (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7.
Preparing to unpack .../5-python3.7_3.7.17-1+jammy1_amd64.deb ...
Unpacking python3.7 (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7-dev.
Preparing to unpack .../6-python3.7-dev_3.7.17-1+jammy1_amd64.deb ...
Unpacking python3.7-dev (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7-lib2to3.
Preparing to unpack .../7-python3.7-lib2to3_3.7.17-1+jammy1_all.deb ...
Unpacking python3.7-lib2to3 (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7-distutils.
Preparing to unpack .../8-python3.7-distutils_3.7.17-1+jammy1_all.deb ...
Unpacking python3.7-distutils (3.7.17-1+jammy1) ...
Selecting previously unselected package python3.7-venv.
Preparing to unpack .../9-python3.7-venv_3.7.17-1+jammy1_amd64.deb ...
Unpacking python3.7-venv (3.7.17-1+jammy1) ...
Setting up libpython3.7-minimal:amd64 (3.7.17-1+jammy1) ...
Setting up python3.7-minimal (3.7.17-1+jammy1) ...
Setting up python3.7-lib2to3 (3.7.17-1+jammy1) ...
Setting up libpython3.7-stdlib:amd64 (3.7.17-1+jammy1) ...
Setting up libpython3.7:amd64 (3.7.17-1+jammy1) ...
Setting up libpython3.7-dev:amd64 (3.7.17-1+jammy1) ...
Setting up python3.7-distutils (3.7.17-1+jammy1) ...
Setting up python3.7 (3.7.17-1+jammy1) ...
Setting up python3.7-venv (3.7.17-1+jammy1) ...
Setting up python3.7-dev (3.7.17-1+jammy1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
NEEDRESTART-VER: 3.5
NEEDRESTART-KCUR: 5.15.0-1041-azure
NEEDRESTART-KEXP: 5.15.0-1041-azure
NEEDRESTART-KSTA: 1
++ curl -s -k https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
++ apt-get download python3-distutils
Get:1 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-distutils all 3.10.8-1~22.04 [139 kB]
Fetched 139 kB in 18s (7687 B/s)
++ '[' -f python3-distutils_3.6.9-1~18.04_all.deb ']'
++ '[' -f python3-distutils_3.8.10-0ubuntu1~20.04_all.deb ']'
++ '[' -f python3-distutils_3.10.6-1~22.04_all.deb ']'
++ echo 'Unrecognized python3 distutils .deb package filename; this is a bug in setup-python37-with-pip3-in-ubuntu.shinc'
Unrecognized python3 distutils .deb package filename; this is a bug in setup-python37-with-pip3-in-ubuntu.shinc
++ exit 1
The CI builds are failing: