Python 3.5 on Centos/RHEL

Python 3.5 is currently not supported within the Redhat fmaily except on Fedora. If you want to install 3.5 you will need to follow one of the below steps.

1. Install from source

# cd /usr/src
# wget
Now extract the downloaded package.

# tar xzf Python-3.5.2.tgz
Compile Python Source

Use below set of commands to compile python source code on your system using altinstall.

# cd Python-3.5.2
# ./configure
# make altinstall
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Now remove downloaded source archive file from your system

# rm Python-3.5.2.tgz

2. Install from IUS repo
sudo yum -y install
sudo yum -y install python35u