How to install any of the Python 3 versions?

How to install any of the Python 3 versions?

How to install any of the Python 3 versions?

Last month, I was as usual testing certain applications and one of them was FreeGaming. This app is basically a python program which download game packs necessary according to GNU / Linux distribution that we have. And the same, has both a terminal interface (CLI) and Desktop (GUI).

For the CLI case, it worked normally for me with the python packages (3.9 version) of my current Respin Miracles based on the MX Linux Distro. However, its GUI interface, both compiled and in the format  ".AppImage" use or require Python 3.10-based packages or higher. Therefore, I have to use a very useful and practical trick, to "install higher versions of Python" that I am going to share with you today.

Python

Python is a high-level interpreted programming language whose philosophy emphasizes the readability of its code.

And, before you start reading this post about the possibility of being able to "install higher versions of Python", we will leave some links to previous related posts for later reading:

Python
Related article:
Python 3.11 arrives with performance improvements, caching redesign and more
Optimize your GNU/Linux: Debian packages to develop apps
Related article:
Optimize your GNU/Linux: Debian packages to develop apps
Install any version of Python 3: Using a PPA repository

Install any version of Python 3: Using a PPA repository

Install any version of Python 3: Using a PPA repository

Is it good to use PPA repositories?

Since, a PPA repository (Personal Package Archive) is a repository (warehouse) of software staff housed in Launchpad, you must always be careful that it is not from someone totally unknown, or from an unverified or untrusted third party. Therefore, unless a certain PPA Repository is not from a known organization or developer(s), it is preferable to refrain from handling them to avoid ending up with insecure software, however free and open it may be.

In the case of Team Deadsnakes PPA Repository, it has shown, over time, to be a reliable supplier of packages of different python versions for Ubuntu, and Distros derived from it, and compatible with Debian GNU / Linux.

However, and as it says, when using it, the following warning should always be taken into account:

"Disclaimer: There is no guarantee of timely updates in case of security or other issues. If you want to use them in a secure or other environment (for example, on a production server), you do so at your own risk.". Team Deadsnakes

Finally, currently and officially, it offers the availability of the following versions:

  • Ubuntu 18.04 (bionic): Python 2.3 and 2.6; and also Python 3.1, 3.5, 3.7 and 3.11.
  • Ubuntu 20.04 (focus): Python 3.5, 3.7, 3.9 and 3.11.
  • Ubuntu 22.04 (jammy): Python 3.7, 3.9 and 3.11.

However, today you can already find the availability of Python 3.12.

Steps to install any version of Python 3

Steps to install any version of Python 3

Taking into account all of the above, whether on Ubuntu, Debian or any Distro/Respin derived from them, the procedure to install and use the Team Deadsnakes PPA Repository is:

  • Open a Terminal Emulator
  • Run the following commands:
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update
  • Once the list of packages has been successfully updated, you can now run the installation of the available versions of Python. For example, to install Python 3.12 it can be executed, in any of the following 2 ways, for a minimum or full installation:
sudo apt-get install python3.12 sudo apt-get install python3.12-full

In my particular case, when using the Respin mentioned above at the beginning, I have had edit the sources.list file required with the following command:

sudo nano /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-$VersionDebianDetectada.list

Then, change the word "bullseye" or "bookworm" or any other word corresponding to Debian and Derivatives with the words "jammy" or "focal" corresponding to Ubuntu. And thus obtain the following repository line (software source) as a result:

deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ jammy main

And continue to update the list of packages again, to finish with the install python version 3, which I needed.

Roundup: Banner post 2021

Summary

In short, we hope that this little trick or treat, be very useful, both to software developer usersLike Python-based application users, that require "install higher versions of Python" to those normally available in their respective GNU/Linux distros based on Ubuntu/Debian. And if anyone knows or has any another useful alternative or do you want to contribute suggestion, recommendation or correction to what is provided here, you are welcome to do so through the comments.

And yes, you simply liked this publication, do not stop commenting on it and sharing it with others. Also, remember to visit our «homepage» to explore more news, as well as join our official channel of Telegram from DesdeLinux, West group for more information on today's topic.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.