Python 3.12.0 Released! How to Install via Ubuntu PPA

Last updated: October 3, 2023 — Leave a comment

Python 3.12.0 final was officially announced this Monday! Ubuntu LTS can easily install it from PPA.

New features in Python 3.12.0:

  • More flexible f-string parsing, allowing many things previously disallowed.
  • Python-level API for the buffer protocol
  • New API for monitoring Python programs running on CPython at low cost.
  • Per-Interpreter Global Interpreter Locks
  • Support for the Linux perf profiler to report Python function names in traces.
  • New type annotation syntax for generic classes
  • New decorator typing.override() in the typing module.

The new Python release also removed a few deprecated modules, including smtpd and distutils. For Ubuntu 22.04, Ubuntu 20.04, it causes a broken pip. As a workaround, you need to manually install pip for Python 3.12.

How to Install Python 3.12.0 in Ubuntu:

For Ubuntu 22.04, Ubuntu 20.04, and their derivatives such as Linux Mint 21, the Deadsnakes PPA has made the packages for all supported CPU architecture types: amd64, arm64/armhf, ppc64el, and s390x.

1. First, press Ctrl+Alt+T on keyboard to open terminal. Then paste the command below and hit run to add PPA:

sudo add-apt-repository ppa:deadsnakes/ppa

Type user password (no asterisk feedback) when it asks and hit Enter to continue.

2. Ubuntu 20.04+ automatically refresh package cache while adding PPA. However, Linux Mint user may need to do this job manually by running command:

sudo apt update

3. Finally, run command to install Python 3.12:

sudo apt install python3.12

For other Ubuntu editions, you may manually compile Python 3.12 from source tarball.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*