CentOS and RHEL 7 have Python 2.7 available in the standard packages. You can install Python 3.6 from source while keeping the current 2.7 install on your machine, so any existing dependencies will not break.

yum install gcc
yum install zlib-devel
yum install openssl-devel
yum install sqlite-devel
cd /usr/src
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
tar xzf Python-3.6.1.tgz
cd Python-3.6.1
make altinstall
cd ..
rm Python-3.6.1.tgz

You can now run python3.6 and pip3.6 from your command line.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.