What we want is the link to “Gzipped source tarball”.Īt the time of writing, this is the source tarball download link ``. Follow that link and scroll down to Files. There you’ll see something like Latest Python 3 Release – Python 3.x.x. To do this, visit the official Python website, check the Downloads section and click to download Source code. Now we’ll need to download the latest version onto our machine.
#UBUNTU DOWNLOAD PYTHON INSTALL#
Sudo apt-get install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev Step 2 – Download Python 3.x To install them, run the following commands: sudo apt-get install build-essential $ sudo apt-get updateįor this method, we’ll need the tools and libraries to build the source for Python. Step 1 – Prerequisitesįirst off, let’s update our package index. The advantage to installing Python 3 this way is that you control the installation and it can be more secure at times, depending where the package is downloaded from. This method is more complicated and it takes more time. If it’s already installed, then you can upgrade to the latest version by running: $ sudo apt-get upgrade python3 Method #2 – Install the Latest Python 3 from Source Code If you want to install the latest version of Python 3 on your machine, run the following command: Step 2 – Install the Python 3.x $ sudo apt-get install python3 To check if there are multiple versions installed, run the following command to view all versions: $ apt list -installed | grep python
To do this run one of the following commands: $ python3 -V $ python3 -version Step 1 – Prerequisitesīefore installing, first let’s perform all updates, and then check the version currently installed on your machine. This method is the easier way to install the latest version of Python. Method #1 – Install the Latest Python 3 from Repositories Method #2 – Install the Latest Python 3 from Source Code.Method #1 – Install the Latest Python 3 from Repositories.