Install with setuptools
with one or two steps: python setup.py build
and python setup.py install
. To uninstall follow the SO question here, which suggests
python setup.py install --record files.txt
cat files.txt | xargs rm -rf
RedHat has a thing called software collections that lets other versions of Python (and other languages or databases) be installed.
yum install python27
scl enable python27 bash
which python
To run a python script or program with the scl version of python, there are two ways.
The first picks up the environment variable for python
#!/usr/bin/env python
The second is to fully qualify the path for python
#!/opt/rh/python27/root/usr/bin/python