How to install Python 3.6 in Centos 7 the easy way

First of all, you’ll need to update your system:

sudo yum update -y

The SCL or Software Collections project is an open-source project. Its goal is to let you install and run multiple versions of the same software on the same system. To install Python 3.6 x64, you need to install SCL:

sudo yum install -y centos-release-scl

Now install Python 3.6 x64:

sudo yum install -y rh-python36

Now enable Python 3.6 virtual environment on this machine:

scl enable rh-python36 bash

To enable it permanently add these lines at the bottom of bash profile:

To edit bash_profile.

cd ~ && vi .bash_profile

Add these lines:

#add python36 to the bash permanently
scl enable rh-python36 bash

Run this command to apply immediately:

exec bash

To development Python applications, you will need Development tools sooner or later:

sudo yum groupinstall -y "Development Tools"

To install pipenv we’ll need root privilege:

su - root
sudo yum install -y rh-python36

#Upgrade to new version of pip
pip install --upgrade pip 

#now install pipenv
pip install pipenv 

Now you can switch back to normal user and use pipenv as normal.

Related:  What is httpd ? [closed]