How to Install Python on Linux Mint 19

How to Install Python on Linux Mint 19
How to Install Python on Linux Mint 19

Install Python on Linux Mint 19

Linux Mint 19 comes with Python 3 installation out of the box as a default interpreter. In the minimal installation of Linux Mint, this does not come pre-installed so now we are going to install Python on Linux Mint 19.

Prerequisites

Before you start installing Python on Linux Mint 19. You must have a non-root user account on your server with sudo privileges.

Before You Begin

Before we begin please check whether Python is installed or not on your system by typing

python --version

If the output shows Python version then you already have Python installed or if it outputs command not found then Python is not installed. However, you can also upgrade or downgrade the version of Python.

Install Python 3 on Linux Mint

Update package manager index by typing following command

sudo apt update

The following command will provide minimal installation of Python. now to install Python 3 enter following command

sudo apt install python3-minimal

Confirm the installation and check the version of Python by entering the following command.

python3 -V

The output should be:

Output
    Python 3.6.6

Install Python 2 On Linux Mint

Before you install Python on Linux Mint 19, update the package manager index by typing the following command.

sudo apt update

The following command will provide minimal installation of Python. now to install Python 2 enter the following command.

sudo apt install pytho3-minimal

Confirm the installation and check the version of Python by entering the following command.

python --version

The output should be:

Output:
    Python 2.7.15rc1

Install Python Modules

Linux Mint repository already has a lot of Python modules. To Search Python modules enter the following command

sudo apt search MODULE_NAME

To install searched Python module enter following command

sudo apt install MODULE_NAME

Best way to install and manage python packages

PIP stands for Python Package Index which most popular tool for installation and management of Python packages. You cand check more information about this tool on the following link: How to install PIP on Ubuntu 18.04

Conclusion

Here we have learned how to install Python on Linux Mint 19. If You have any queries regarding this then please comment below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here