May 29, 2021 Article blog
Today's W3Cschool compilation brings you how Linux installs Python, many Linux have an installation by default but the version may be older, so first check the version number of Python in the system with commands.
$ python3 --version
If the user is using Ubuntu 16.10 or later, it is recommended to use the command directly:
$ sudo apt-get update
$ sudo apt-get install python3.92
Users are using a different version of the Ubuntu system, and it is recommended to use deadsnakes PPA to install Python 3.92
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.92
There are also users who are using Linux distributions with pre-installed Python 3, and if they do not have preinstry you can use the package management tools built into the release, such as using dnf in Fedora:
$ sudo dnf install python3
Linux how to install Python is introduced here, I hope to help you, more questions can be found in our Python column.