{"id":12571,"date":"2022-09-03T12:12:00","date_gmt":"2022-09-03T16:12:00","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=12571"},"modified":"2022-09-03T12:12:06","modified_gmt":"2022-09-03T16:12:06","slug":"how-to-install-python-3-10-on-ubuntu-22-04","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/how-to-install-python-3-10-on-ubuntu-22-04\/","title":{"rendered":"How to Install Python 3.10 on Ubuntu 22.04"},"content":{"rendered":"\n
This guide will show you how to install Python 3.10 on Ubuntu 22.04 or the latest Debian based Linux systems.<\/p>\n\n\n\n
First off, you will need to run a quick update to ensure your system is up-to-date with the required packages.<\/p>\n\n\n\n
$ sudo apt update && sudo apt upgrade -y<\/code><\/pre>\n\n\n\nMethod 1: Install Python 3.10 on Ubuntu 22.04 Using the APT Utility<\/h2>\n\n\n\n
This is probably the easier method of installing the programming tools. This method makes it easy to receive continued updates, bug fixes, and security patches. With this option we need to install the relevant PPAs.<\/p>\n\n\n\n
Let’s first install the required dependency before adding custom PPAs.<\/p>\n\n\n\n
$ sudo apt install software-properties-common -y<\/code><\/pre>\n\n\n\nProceed to add the deadsnakes PPA to the APT package manager sources list using the command below.<\/p>\n\n\n\n
$ sudo add-apt-repository ppa:deadsnakes\/ppa<\/code><\/pre>\n\n\n\nOnce done we can go ahead and install the packages using the following command:<\/p>\n\n\n\n
$ sudo apt install python3.10<\/code><\/pre>\n\n\n\nVerify your Python 3.10 installation by checking its version:<\/p>\n\n\n\n
$ python3 -V<\/code><\/pre>\n\n\n\nOutput\n3.10.6<\/code><\/pre>\n\n\n\nMethod 2: Install Python 3.10 on Ubuntu 22.04 from Source<\/h2>\n\n\n\n
The other alternative to installing any version of Python on Ubuntu systems is from the Source code. This is our recommended way even though it requires more steps than the apt method above.<\/p>\n\n\n\n
As always, make sure your system is up-to-date with the latest packages.<\/p>\n\n\n\n
$ sudo apt update && sudo apt upgrade -y<\/code><\/pre>\n\n\n\nInstall the required prerequisite packages for the compilation of the Python<\/a> source code using this command.<\/p>\n\n\n\n$ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev<\/code><\/pre>\n\n\n\n