

It opens Python 2 version interpreter prompt. Interestingly, you can download both Python 2 and Python 3 versions on your single system. Meanwhile, you can have coffee for you as it may take some time to install. If you are not root user, you should use sudo keyword every time installing Python package on your Linux system.
Install python 2.7 ubuntu and centos install#
Redhat / RHEL / CentOS Linux User should run the following command to install Python. Yum Package Manager (Redhat / RHEL / CentOS)

It installs the latest Python version for both Python 3 and Python 2. Installing Python 2: $ sudo dnf install python2 Installing Python 3: $ sudo dnf install python3 DNF Package Manager (Fedora)įedora has a default DNF package manager for installing and managing packages in Linux. Make a habit of updating installed packages before installing any new package (First command mentioned above). Note: There can be multiple dependencies among packages installed on Linux. If you want to install Python 2 version, run following commands… $ sudo apt-get update To install Python in these Linux distribution, Open terminal and run command those are given below.

Ubuntu and Linux Mint distributions use APT for package management. APT package manager (Debian / Ubuntu / Linux Mint) There are different package manager used by the different Linux distribution.īased upon type of Linux distribution you are using, check the following commands to install latest Python version. To install any package on Linux, you need to use a specific command based on the package manager.
Install python 2.7 ubuntu and centos how to#
Let’s see how to install Python on each Linux distribution, individually. Or you can skip downloading it if you have internet connection to your Linux system where you want to install Python.Īs we all know, there are various flavors of Linux such as Ubuntu, Fedora, Linux Mint, CentOS… And each one of the Linux distribution has a particular package manager.ĭepending on the package manager, you need to follow commands to install Python on Linux. You can download Python package from their official website. In recent, Instagram is migrated from Python 2 to Python 3, successfully. To update you, many of the giant companies are moving to Python 3. In this tutorial, I will be covering the installation of both versions. In the previous article, I have described all the steps to be followed to install Python on the Windows system. In this article, I am sharing all the commands you should run to install Python on Linux, including various Linux distributions.
