Skip to main content

Command Palette

Search for a command to run...

How to Install Python on Linux Mint | Beginners Guide

Updated
3 min read
How to Install Python on Linux Mint | Beginners Guide
P

As an experienced Linux user and no-code app developer, I enjoy using the latest tools to create efficient and innovative small apps. Although coding is my hobby, I still love using AI tools and no-code platforms.

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:

  1. Launch the terminal app.

  2. Update apt by typing sudo apt update and pressing Enter. Type your user password.

  3. 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:

  1. Launch the terminal app.

  2. Run sudo apt update

  3. Install with sudo apt install python2 or sudo 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:

  1. In your terminal, run python3 and press Enter.

  2. You'll see the Python prompt, indicated with >>>.

  3. Type print("Hello World") and press Enter to run a quick test print statement.

  4. 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!

More from this blog

T

TheTechDeck | Tech Made Simple for Everyone

772 posts

Explore the best tech tips and tricks for Windows, Mac, Linux, Android, and gaming. Simplify tech with TechUvy's expert guides