Installing Python 2.7.11 on CentOS 7
CentOS 7 ships with python 2.7.5 by default. We have some software that requires 2.7.11. It's generally a bad idea to clobber your system python, since other system-supplied software may rely on it being a particular version.
Our strategy for running 2.7.11 alongside the system python is to build it from source, then create virtualenvs that will run our software.
Step 1. Update CentOS and install development tools
# as root yum upgrade -y yum groupinstall 'Development Tools' -y yum install zlib-devel openssl-devel
Step 2. Download the Python source tarball
# As a regular user (avoid doing mundane things as root) $ cd /tmp $ wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tgz $ tar -zxf Python-2.7.11.tgz $ cd Python-2.7.11
Step 3. Configure, build and install into /opt
(replace with /usr/local/
if you prefer)
$ ./configure --prefix=/opt/ $ make $ make install
Comments
Comments powered by Disqus