
Python is an open-source and most popular programming language. Currently, Python 3.8 is the latest major release of the Python language. The latest version includes many new improvements such as assignment expressions, f-strings support, and more. This tutorial covers how to install Python 3.8 on Debian 10 system.
Install Python 3.8 on Debian
By default, Python 3.8 is not available in the standard Debian 10 repositories so we will download it from Python source.
Perform the following steps to install Python 3.8 on your Debian system:
Step 1 – Install Libraries
To install Python from source, you need to install some development libraries to compile Python source code. Execute below commands:
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
Step 2 – Download Python 3.8
Download the latest Python source code from the Python official site with wget. Check the latest version at the time of downloading:
sudo wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz
Once the download is complete, extract the downloaded source archive file.
sudo tar xzf Python-3.8.2.tgz
Step 3 – Building Python
Now go to the Python source directory and run the configure script and altinstall
command as sudo user to build Python source code:
cd Python-3.8.2
./configure --enable-optimizations
sudo make altinstall
It will check that all of the dependencies on your system are installed.
Note : Do not use the standard make install
as it will overwrite the default system python3 binary.
Step 4 – Verify Python Version
To verify it by type:
python3.8 --version
Python-3.8.2
Congratulations! Python 3.8 is installed on your Debian system and ready to be use.
Conclusion
This guide explained you how to install Python 3.8 on Debian 10 system.
If you have any questions or feedback, please leave a comment below.
Leave a Reply