Skip to content

Instantly share code, notes, and snippets.

@lenosi
Created November 7, 2017 21:17
Show Gist options
  • Save lenosi/68ed67266e9932178a56b92172d8fc3f to your computer and use it in GitHub Desktop.
Save lenosi/68ed67266e9932178a56b92172d8fc3f to your computer and use it in GitHub Desktop.
How to use Python 3.x on RHEL/CentOS 6.x

Using Software Collections

RHEL 6.x

$ yum-config-manager --enable rhel-server-rhscl-6-rpms
$ yum-config-manager --enable rhel-server-rhscl-beta-7-rpms
$ yum install rh-python36 # Or rh-python37

CentOS 6.x

@TODO

Using custom compilation (gcc)

$ yum groupinstall -y "development tools"

wget/Download tgz package of Python which you need from https://www.python.org/downloads/release

For example:

$ cd /usr/src
$ wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
$ tar xzf Python-3.6.3
$ cd Python-3.6.3
$ ./configure
$ make altinstall
$ rm Python-3.6.3.tgz

Now you can test it:

python36 -V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment