User Tools

Site Tools


python_altinstall

source http://sowingseasons.com/blog/building-python-2-7-10-on-raspberry-pi-2.html source https://github.com/h2oai/h2o-2/wiki/Installing-python-2.7-on-centos-6.3.-Follow-this-sequence-exactly-for-centos-machine-only

Using Alt install

Prerequisites

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 xz-devel

Python 2.10.5

Source: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/

Now the dependancies have been installed we can go ahead and get the python tar:

wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar -zxvf Python-2.7.10.tgz
cd Python-2.7.10
The following command will install the Python interpreter in /usr/local/bin/python2.7
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

Download and install Setuptools + pip

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python2.7 ez_setup.py

easy_install-2.7 pip

python_altinstall.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1