Python is a popular programming language at the present time due to its speed, portability of programs written in it, and a relatively low entry threshold for novice developers. The material below will describe the process of upgrading to version 3.10.9 of this language packages on a host running Debian OS.
Updating the system software of the operating system
We will execute all commands as the root user, for this we execute: sudo -i First of all, let's update the OS itself:
aptitude update aptitude upgrade
After the OS update is complete, let's look at the current available language support libraries:
Python -V
Install dependent software, compile
aptitude install build-essential checkinstall libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev libc6-dev libbz2-dev libffi-dev libgdbm -y
Download the actual file, unpack it to an arbitrary location:
curl https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz tar xzf Python3.10.9.tgz
Moving to location:
cd Python3.10.9
Then we compile:
./configure --enable-optimizations
And then install:
make install
Check if the update is correct
python3.10 -V
Removing temporary files
If there is no need for previously downloaded archive files, they can be deleted as follows:
cd .. Rm -rf Python-3.10.* sudo aptitude clean
Outcome
Now ready to use the updated version of Python on the server.