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-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
By default, Debian 10 comes with Python version 3.7 only. In this article, we are going to install Python 3.9 on Debian 10 system.
Download Python 3.9 source archive from its official website.
Extract the downloaded file.
tar xzf Python-3.9.4.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@vps:~/Python-3.9.4# python3.9 --version Python 3.9.4
Check the installed version of pip by running the following command,
root@vps:~/Python-3.9.4# pip3.9 -V pip 20.2.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)