Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation.
First, check for any pending system updates,
apt update apt upgrade
Install required packages.
apt install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
By default, Debian 11 bullseye comes with Python version 3.9.2 only. In this article, we are going to install Python 3.9.6 on Debian 11 system.
Download Latest Version of Python 3.9 source archive from its official website.
Extract the downloaded file.
tar xzf Python-3.9.6.tgz
Change to the extracted directory with following command.
Run configuration command.
Complete the Python installation on Debian system by running the following command.
To check Python version.
root@server:~# python3 --version Python 3.9.6
Check the installed version of a pip by running the following command,
root@server:~# pip3.9 -V pip 21.1.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)