Python is one of the most widely used programming languages in the world. With its simple and easy to learn syntax, Python is a popular choice for beginners and experienced developers. Python is quite a versatile programming language. It can be used to build all kinds of applications, from simple scrips to sophisticated machine learning algorithms.
Debian 10 includes Python version 3.7, which can be installed or updated using the apt
tool.
At the time of writing, Python 3.8 is the latest major release of the Python language. It includes many new features such as assignment expressions, positional-only parameters, f-strings support, and more
. Python 3.8 is not available in the standard Debian 10 repositories.
This tutorial covers how to install Python 3.8 on Debian 10. We’ll also show you how to create a virtual environment.
Building Python 3.8 on Debian is a relatively straightforward process and will only take a few minutes.
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
Python download page
with wget or curl
. At the time of writing this article, the latest release is 3.8.2
:curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
tar -xf Python-3.8.2.tar.xz
configure
script:cd Python-3.8.2
./configure --enable-optimizations
--enable-optimizations
option will optimize the Python binary by running multiple tests, which will make the build process slower.make
to start the build process:make -j 4
-j
to correspond to the number of cores in your processor. You can find the number by typing nproc
.sudo make altinstall
make install
as it will overwrite the default system python3
binary.python3.8 --version
Python 3.8.2
#debian 10 #python