CentOS 7/Red Hat Enterprise Linux 7 ships with Python 2. Due to long term support and stability, there is no Python 3 available. This article will demonstrate, how to install Python 3 on a CentOS 7 machine. Overall, it is pretty easy but the compilation takes some time.
yum install -y make gcc libffi-devel zlib-devel
tar xf Python*
You can now start python by typing python3.
Just be aware to always point to the right python3 binary/library:
Example for cmake: