How to Install Python on Linux Mint | Beginners Guide

Learning how to install Python on Linux Mint is easier than you may think. Python is a popular programming language that is great for beginners and used in data science, web development, and more. Whether you want to follow Python tutorials or build applications, this step-by-step guide has you covered.
Installing Python
There are two versions of Python you may want to install. Python 2 has been around for a while but is being phased out, while Python 3 is newer and the recommended version for programming and running Python applications. The good news is that Linux Mint makes installing either version simple.
Check if Python is Already Installed
Before we install, it helps to check if Python is already present on your Linux Mint system.
Open the terminal app type python3 --version and press Enter. If Python 3 is installed, you'll see a version number. Repeat by typing python2 --version to check for a Python 2 install.
If no versions appear, proceed to install one or both Python interpreters.
Install Python 3 in Linux Mint
The most common method to install Python is by using the apt package manager. Recent versions of Mint already include Python 3 modules, but let's ensure the base package is present:
Launch the terminal app.
Update apt by typing
sudo apt updateand pressing Enter. Type your user password.Next, run the installation with
sudo apt install python3. Agree to any prompts during installation.
That’s it! Both Python 3 and a python3-pip module to manage other packages are now present on your Mint system.
Install Python 2 in Linux Mint
To install and run Python 2 scripts and tools in Linux Mint, repeat the steps above, but replace python3 with python or python2 syntax:
Launch the terminal app.
Run
sudo apt updateInstall with
sudo apt install python2orsudo apt install python
Python 2 is now ready to use side-by-side with Python 3.
Verify Successful Python Install
Before we start coding or running scripts in Python, let's verify everything works correctly.
For Python 3:
In your terminal, run
python3and press Enter.You'll see the Python prompt, indicated with
>>>.Type
print("Hello World")and press Enter to run a quick test print statement.Type
exit()and press Enter to leave the Python interpreter.
Repeat the same test process for Python 2 by just typing python instead of python3 at the first step.
If both interpreters work correctly, you now have full working Python environments on your Linux Mint desktop or laptop!
Next Steps After Installing Python
Once up and running, using Python is fun and easy on Mint. Some ideas on what to try next:
Follow Python tutorials at your own pace
Install packages like pandas, NumPy, and TensorFlow for data science work
Build applications with web frameworks like Django or Flask
Automate system administration tasks on your Linux machine
The world of Python programming now lies open – enjoy! Let the coding begin!






