Debian 10 default repositories come with Python 3.7. So if your application can work with this version, install it from default repositories using command apt install python3 . To install Python 3.9 on Debian 10 follow this tutorial. This tutorial will describe you install Python 3.9 on Debian 10 Linux system.

Prerequisites

Login to the Debian system with sudo privileged account access. Open a terminal (CTRL+ALT+T) and execute the below commands to update packages. Then install the required packages for the compilation of Python source code.

Install Python 3.9 on Debian

The default Debian repositories contain Python 3.7 only. So this tutorial will use Python source code for installation on Debian 10 system. Follow the below steps to install Python 3.9 on Debian: Wait for the Python installation to complete on your system.

Check Python Version

At this step, you have successfully installed Python 3.9 on Debian 10 system. You need to type python3.9 to use this version. For example, to check the Python version, execute: This will also install pip for Python 3.9. That’s it, You have successfully installed Python 3.9 on Debian 10 system.

Conclusion

In this tutorial, you have learned to install Python 3.9 on Debian Linux systems using source code. You can try Python examples via command line.