
This script performs a number of checks to make sure all of the dependencies are present on your system: cd Python-3.11.3. To the Python source directory and run the configure command. Once the download is finished, extract the archive If installing a newer release, change the version number in the commands below.įirst, install the libraries and dependencies necessary to build Python: sudo apt update sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-devĭownload the latest release’s source code from the Python download page The following steps explain how to compile Python 3.11 from the source. This version includes many speed improvements and new features such as new standards library modules, new syntax and built-in features, and more However, you won’t be able to maintain your Python installation through the aptĪt the time of writing this article, the most recent version of the latest major release of Python is 3.11. Installing Python on Ubuntu from Source #Ĭompiling Python from the source allows you to install the latest Python version and customize the build options. If you need another or multiple Python versions installed on your system, you should build it from the source.

How to Install Python on Ubuntu 20.04 and 18.04?
