![]() 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 This method is more complicated and it takes more time. 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. ![]() Step 1 – Prerequisitesįirst off, let’s update our package index. 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. Now we’ll need to download the latest version onto our machine. To do this, visit the official Python website, check the Downloads section and click to download Source code. There you’ll see something like Latest Python 3 Release – Python 3.x.x. Follow that link and scroll down to Files. What we want is the link to “Gzipped source tarball”.Īt the time of writing, this is the source tarball download link ``.
0 Comments
Leave a Reply. |