

It is recommended to set Python 3.10 as a default version. You will get the Python version in the following output:īy default, Python 3.9 is set as a default version in Debian 11.

You can now verify it using the following command: python3.10 -version

noĬonfig.status: creating Misc/python-embed.pcĬonfig.status: creating Misc/python-config.shĬonfig.status: creating Modules/ld_so_aixįinally, build and install Python 3.10 into /usr/local/bin directory without replacing the older Python version: make altinstall Verify Python 3.10 InstallationĪt this point, Python 3.10 is installed on your system. configure -enable-optimizationsĪfter the successful compilation, you will get the following output: checking for -disable-test-modules. Next, start the compilation using the following command. Now, navigate to the extracted directory using the following command: cd Python-3.10.0 Once the Python source is extracted, you can proceed to the next step. Once the download is completed, extract the downloaded tarball using the following command: tar -Jxvf Python-3.10.0.tar.xz You can download the Python 3.10 source either by going to the Python download page and downloading the tarball via your web browser or you can use the wget command to download it via command-line interface: wget -c You can install all the required dependencies using the following command: apt-get install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev -yĪfter installing all the required dependencies, you can move forward to download the Python 3.10 source. So you will need to install essential packages for downloading and compiling Python 3.10 from the source. Install Required Dependenciesīy default, Python 3.10 is not included in the Debian 11 default repository. Once all the packages are updated, restart your system to apply the changes. Next, run the following commands to upgrade all installed packages on your VPS:
