+1 (506) 500-5957 sales@monovm.com Get US VPS for 50% OFF!

How to Install Python 3 on CentOS 7

In this article, we will shortly explain what is Python and then provide a step-by-step tutorial on how to install it on CentOS systems.

Posted: 07 Apr, 19 Updated: 03 Aug, 23 by Elizabet J 2 Min

How to Install Python 3 on CentOS 7

What is Python?

Python is a general purpose, high-level, object-oriented script. It is open source and was developed in 1991 by Von Hansen in Holland.


Unlike some other common programming languages, where code blocks are defined in the parenthesis, Python uses the character spacing and forwarding of the program to specify blocks of code. This means that there are a number of identical spacing characters in the beginning of each block's lines, and this number increases in the inner code blocks. This way blocks of code are automatically organized.


Please note: all the commands written below must be entered with root access.


Tutorial on installing Python 3 in CentOS 7

   1 - First, insert the following commands to update centos server and install dependencies to install Python.

yum -y update
yum -y install yum-utils
yum -y groupinstall development

   2 - To install Python, IUS needs to be installed with the following code.

yum -y install https://centos7.iuscommunity.org/ius-release.rpm

   3 - After installing IUS, now you need to enter the following command to install Python 3.

      yum -y install python36u

   4 - This way Python 3 is installed and you can enter the following command to see the installed version.

    python3.6 -V



Manage Python packages with pip

    To manage Python, you need to have pip installed and pip updated. To do so, enter the following code.

      yum -y install python36u-pip

    Now you can install the packages you want with the below structure.

      pip3.6 install package_name

    Do not forget that in order for the Python packages to work properly, you will need to install the Python36u Developer package vis IUS. You can do so      using the following code.    

      yum -y install python36u-devel

Once these steps are completed, Python should be installed on your CentOS system.

Also here is python installation on debian server.

https://monovm.com/blog/how-to-install-python3-on-debian9/

Elizabet J

Elizabet J

One OF my major goals is getting new experiences about ICT and what’s more making progress through this field.