


Using the Apt package manager is the easiest method of installing Python 3.9 on Linux. Here’s how you do it: Updating Python Using Apt-Get Using Apt to update Python is faster and easier. You can now install the latest version of Python in two ways: using Apt and using the source code. To check what version of Python 3 your machine has, open the Terminal by pressing Ctrl+Alt +T, and type in the following command: python3 –version Or alternatively: python3 -V The output should look something like this: If you see that your machine doesn’t have Python 3.9, you must run the following commands: sudo apt update sudo apt install software-properties-common These commands will install the Python packages required to install the newest Python version. If you’re having trouble installing Python on your computer, reading our Python installation guide will help.īefore you run any commands, you can save yourself a lot of effort by checking whether the Linux installation comes with the latest version of Python installed. Note: If you’ve not installed Python on your computer yet, you cannot update to a newer version. Updating Python in computers with Linux or macOS can be more complicated. But the launcher only comes installed on the Windows version of Python 3. In other words, you won’t need to change the PATH variable every time you want to use another version of Python. You can specify which version of Python you want to use to run code with simple switches in commands (like “py -3.6”). Allows you to use two different versions of Python 3 at the same time.Users can run Python from any shell using the command “py.” Typing “python” is no longer required.Furthermore, Python 3 now comes with the “py.exe” launcher integrated by default. If you want to move from Python 2.x to 3.x, you don’t have to uninstall the previous version unless you don’t want to use it anymore. It is possible to install two major versions of Python – say, Python 2.x and Python 3.x – on one computer and use both. How to Update Python in Linux, Mac, or Windows Do you remove the old version first? Or can you update the package directly? Here’s an easy tutorial on how to update Python. Updating Python can be confusing regardless of which OS you’re running.


The most recent version of Python – Python 3.9 – introduces features like Union Operators in dict, the Flexible function, and Type Hinting Generics. Python receives a major update once every 12 months, with bug-fix updates and security patches being released every few months. Last Updated: Saturday 17 th December 2022
