<\/span><\/h2>\r\n\r\n\r\n\r\nBy default, Python version 3.9 is not included in the Debian 10 default repository. So you will need to compile it from the source.<\/p>\r\n\r\n\r\n\r\n
First, download the Python 3.9 source using the following command:<\/p>\r\n\r\n\r\n\r\n
wget https:\/\/www.python.org\/ftp\/python\/3.9.5\/Python-3.9.5.tgz<\/pre>\r\n\r\n\r\n\r\nOnce the download is completed, extract the downloaded file with the following command:<\/p>\r\n\r\n\r\n\r\n
tar -xvzf Python-3.9.5.tgz<\/pre>\r\n\r\n\r\n\r\nNext, change the directory to the extracted directory and configure it with the following command:<\/p>\r\n\r\n\r\n\r\n
cd Python-3.9.5\r\n.\/configure --enable-optimizations<\/pre>\r\n\r\n\r\n\r\nNow, build Python 3.9 using the following command:<\/p>\r\n\r\n\r\n\r\n
make -j 2<\/pre>\r\n\r\n\r\n\r\nNote: <\/strong>Replace 2 with the number of cores in your processor.<\/p>\r\n\r\n\r\n\r\nOnce the build process has been completed, install the Python using the following command:<\/p>\r\n\r\n\r\n\r\n
make altinstall<\/pre>\r\n\r\n\r\n\r\nOnce Python3.9 has been installed, you can verify the Python version with the following command:<\/p>\r\n\r\n\r\n\r\n
python3.9 --version<\/pre>\r\n\r\n\r\n\r\nYou should get the following output:<\/p>\r\n\r\n\r\n\r\n
Python 3.9.5\r\n<\/pre>\r\n\r\n\r\n\r\nYou can set the Python 3.9 as the default version by running the following command:<\/p>\r\n\r\n\r\n\r\n
update-alternatives --install \/usr\/bin\/python python \/usr\/local\/bin\/python3.9 1<\/pre>\r\n\r\n\r\n\r\nOutput:<\/p>\r\n\r\n\r\n\r\n
update-alternatives: using \/usr\/local\/bin\/python3.9 to provide \/usr\/bin\/python (python) in auto mode\r\n<\/pre>\r\n\r\n\r\n\r\nNow, verify the default Python version with the following command:<\/p>\r\n\r\n\r\n\r\n
python --version<\/pre>\r\n\r\n\r\n\r\nYou should see the following output:<\/p>\r\n\r\n\r\n\r\n
Python 3.9.5\r\n<\/pre>\r\n\r\n\r\n\r\nCongratulations! you have successfully installed Python 3.9 on Debian 10.<\/p>\r\n\r\n\r\n\r\n
Of course, you don\u2019t have to install Python 3.9 if you use one of our Managed VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Python 3.9 on Debian 10, for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\r\n\r\n\r\n\r\n\r\n
<\/figure>\r\n<\/div>\r\n\r\n\r\n\r\nFinally, if you liked this post on how to install Python 3.9 on Debian 10, please share it with your friends on social networks using the buttons on the left, or simply show your appreciation by commenting below.<\/p>\r\n","protected":false},"excerpt":{"rendered":"
Python is a free, open-source, and high-level programming language used for scripting and automation. It is very popular, object-oriented, and … <\/p>\n
Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":37103,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700],"tags":[1836,1603,1880],"yoast_head":"\nHow to Install Python 3.9 on Debian 10 | RoseHosting<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n \n \n\t \n\t \n\t \n