
This article explains how to install the latest version of Python3 from source code on Debian 10.
Check the installed Python3 version.
You will see something like this.
If your version is older than your application requires, proceed with this guide.
Install the required dependencies to compile the Python source code.
Visit Python's Source Code Download page to find the latest gzipped source release. Replace the URLs and filenames in this guide with the latest version.
Download the latest Python3 source code.
Extract the downloaded python source code archive.
Compile the python source code.
Install Python.
Check the name of your new Python executable.
Set the new Python executable as default. Replace the two instances of /python3.9 in the following command with the name of your new Python executable.
Update pip. Use the name of your new Python executable in the following command.
Check the name of your new pip executable.
Set the new pip as the default. Use the name of your new pip executable in the following command.
Check the current version of Python and pip.
You will see something like this:
Keeping your Python up-to-date is an important part of the development process. It provides bug fixes compared to older versions, and more importantly, it introduces new features and optimizations.
0 Comments
Be the first to comment and share your perspective with the community.