How to install python 2.7 on Red Hat Enterprise Linux Workstation release 6.5 (Santiago)

root's picture

Red Hat Enterprise Linux Workstation release 6.5 (Santiago) comes with python 2.6 and if you want to install 2.7 you will discover you do not have it on repository.

All you have to do is:

1. Add python 2.7 repository:

sudo sh -c 'wget -qO- >> /etc/yum.repos.d/scl.repo'

2. Install python 2.7:

[root@florian src]# yum install python27

The following packages will be installed:

 Package                                                           Arch                                          Version                                                Repository                                           Size
 python27                                                          x86_64                                        1.1-15.el6                                             scl_python27                                        3.6 k
Installing for dependencies:
 python27-python                                                   x86_64                                        2.7.5-10.el6                                           scl_python27                                         79 k
 python27-python-babel                                             noarch                                        0.9.6-7.el6                                            scl_python27                                        1.4 M
 python27-python-devel                                             x86_64                                        2.7.5-10.el6                                           scl_python27                                        385 k
 python27-python-docutils                                          noarch                                        0.11-1.el6                                             scl_python27                                        1.6 M
 python27-python-jinja2                                            noarch                                        2.6-9.el6                                              scl_python27                                        548 k
 python27-python-libs                                              x86_64                                        2.7.5-10.el6                                           scl_python27                                        5.5 M
 python27-python-markupsafe                                        x86_64                                        0.11-11.el6                                            scl_python27                                         24 k
 python27-python-nose                                              noarch                                        1.3.0-1.el6                                            scl_python27                                        289 k
 python27-python-pygments                                          noarch                                        1.5-2.el6                                              scl_python27                                        800 k
 python27-python-setuptools                                        noarch                                        0.9.8-1.el6                                            scl_python27                                        422 k
 python27-python-simplejson                                        x86_64                                        3.2.0-1.el6                                            scl_python27                                        173 k
 python27-python-sphinx                                            noarch                                        1.1.3-7.el6                                            scl_python27                                        1.1 M
 python27-python-sqlalchemy                                        x86_64                                        0.7.9-3.el6                                            scl_python27                                        2.1 M
 python27-python-virtualenv                                        noarch                                        1.10.1-2.el6                                           scl_python27                                        1.4 M
 python27-python-werkzeug                                          noarch                                        0.8.3-5.el6                                            scl_python27                                        555 k
 python27-runtime                                                  x86_64                                        1.1-15.el6                                             scl_python27                                        1.0 M

Transaction Summary
Install      17 Package(s)

3. Enable python 2.7 as default:

[root@florian src]# python -V
Python 2.6.6
[root@florian src]# scl -l
[root@florian src]# scl enable python27 bash
[root@florian src]# python -V
Python 2.7.5

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content