Skip to content

Instantly share code, notes, and snippets.

@jitran
Created May 15, 2018 05:14
Show Gist options
  • Save jitran/b0df4e2d3c9d14a3ce378c5edfdb0f1e to your computer and use it in GitHub Desktop.
Save jitran/b0df4e2d3c9d14a3ce378c5edfdb0f1e to your computer and use it in GitHub Desktop.
Run Python 3.6 in RHEL6
#!/bin/bash
if grep -q -i "release 6" /etc/redhat-release 2> /dev/null
then
sudo yum -y install scl-utils
sudo yum -y install --enablerepo=rhui-ap-southeast-2-rhel-server-rhscl rh-python36
PYTHON36=$(scl enable rh-python36 "bash -c 'which python'")
export PATH=$(dirname $PYTHON36):$PATH
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment