0

For Ubuntu 18.04 and 20.04 I need to install python 3. Currently 3.9.5 as I wrote this post. I watched some videos on youtube and read some tutorials. There are two different approaches

One

sudo apt install python3 [python-pip]`

Two

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9

The situation is that about “deadsnakes” team says:

  • Team for maintaining unofficial Python packages for different releases of Ubuntu.

And in ppa:deadsnakes - New Python Versions says:

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.

Observation: The tutorials and videos based on ppa:deadsnakes are <1 year ago (they are not neither very old nor outdated) and even are for Ubuntu 20.04 and works. Question 1: When could be mandatory take the ppa:deadsnakes approach?

So thinking in have always the latest, stable and secure python installed. Question 2: what approach is the correct?

I am not sure, but seems there is no an official guide to install Python (latest version 3.9.5) on Ubuntu. Question 3: Is there an official (latest-stable-secure) Python repository for PPA?.

For future

So if Python at https://www.python.org/ releases the 3.9.6 version, then if sudo apt update upgrade is executed that new release must be installed

Manuel Jordan
  • 1,768
  • 7
  • 30
  • 50
  • 2
    Why do you need 3.9? Whatever you do, do not change default python version that comes with Ubuntu version you have. – oldfred May 04 '21 at 21:58
  • The latest release is expected to have many bugs fixed and new features and improved performance. – Manuel Jordan May 04 '21 at 22:02
  • 2
    If the bugs are security fixes; they are back-ported to the version that comes with Ubuntu (if's more work to backport than provide a later version; you'll get a newer version instead which explains why versions can be upgraded sometimes). New features are not back-ported; but if you want the latest programs/features you should be using the latest release (3.9.4-1 currently) and not using latest-2 * & latest-7 releases. – guiverc May 04 '21 at 22:26
  • 1
    No personal package archive (PPA) is official for Ubuntu; they are testing only (or 3rd party) as stable is found in official Ubuntu repositories. https://help.ubuntu.com/community/Repositories/Ubuntu – guiverc May 04 '21 at 22:27
  • @guiverc your latest comment is confuse, which is stable? – Manuel Jordan May 04 '21 at 22:35
  • @oldfred and @guiverc, consider to read the For future block added. – Manuel Jordan May 04 '21 at 22:36
  • 2
    PPAs are personal package archives (what PPA name is) and are not by definition stable but intended for unofficial 3rd party packages OR for use in testing software. No PPA is ever official as that's what Ubuntu repositories are for (or the Snap Store) - see https://help.ubuntu.com/community/Repositories/Ubuntu Ubuntu repositories 'main' 'restricted' 'universe' and 'multiverse' are stable. – guiverc May 04 '21 at 22:43
  • Thanks, so the sudo apt install python3 [python-pip] is the correct approach. – Manuel Jordan May 04 '21 at 22:46

0 Answers0