Install python on Redhat based os without breaking yum / 28 Sep 2015 / Author: Haim Ari

    Estimated read time: 1 min

    Here is how you can safely install python from source:

    First, download and install the following packages:

    yum groupinstall "Development tools"
    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel


    tar xf Python-2.7.10.tar.xz
    cd Python-2.7.10
    ./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
    make && make altinstall

    Now get the setup script for Setuptools:


    Then install it for Python 2.7 and/or Python 3.3:


    Now install pip using the newly installed setuptools:

    easy_install-2.7 pip