Create a gist now

Instantly share code, notes, and snippets.

Embed
Install python 2.7.3 on CentOS 5.8
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall
/usr/local/bin/python2.7
set -o vi
wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
tar xf distribute-0.6.27.tar.gz
cd distribute-0.6.27
python2.7 setup.py install
/usr/local/bin/easy_install-2.7 virtualenv
@NoSyu

This comment has been minimized.

Show comment
Hide comment
@NoSyu

NoSyu Aug 11, 2013

Thanks! It's really helpful!

NoSyu commented Aug 11, 2013

Thanks! It's really helpful!

@openinx

This comment has been minimized.

Show comment
Hide comment
@openinx

openinx Aug 20, 2013

without zlib Pacakge ?
without openssl ?

openinx commented Aug 20, 2013

without zlib Pacakge ?
without openssl ?

@byomkesh99

This comment has been minimized.

Show comment
Hide comment
@byomkesh99

byomkesh99 Sep 3, 2013

My Friends! Thanks for help. But I was able to install till line 13. After that "wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz" portion not downloading the packages.

links seems to be broken..

Thanks again! I am able to install my django on top of python now :)

My Friends! Thanks for help. But I was able to install till line 13. After that "wget http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz" portion not downloading the packages.

links seems to be broken..

Thanks again! I am able to install my django on top of python now :)

@rritoch

This comment has been minimized.

Show comment
Hide comment
@rritoch

rritoch Sep 4, 2013

@byomkesh99 add --no-check-certificate to the end of each wget command in the script that should fix the problem. I'm running the scripts now so I don't yet know if this will fully resolve the problem. Be prepared to respond to some yum prompts though, this script isn't 100% automatic but it beats a manual install.

rritoch commented Sep 4, 2013

@byomkesh99 add --no-check-certificate to the end of each wget command in the script that should fix the problem. I'm running the scripts now so I don't yet know if this will fully resolve the problem. Be prepared to respond to some yum prompts though, this script isn't 100% automatic but it beats a manual install.

@shmezr

This comment has been minimized.

Show comment
Hide comment
@shmezr

shmezr Sep 4, 2013

thanks!

shmezr commented Sep 4, 2013

thanks!

@jfabian

This comment has been minimized.

Show comment
Hide comment
@jfabian

jfabian Oct 14, 2013

Hi:

IOError: invalid Python installation: unable to open /usr/local/lib/python2.7/config/Makefile (No such file or directory)

:(

jfabian commented Oct 14, 2013

Hi:

IOError: invalid Python installation: unable to open /usr/local/lib/python2.7/config/Makefile (No such file or directory)

:(

@stantonk

This comment has been minimized.

Show comment
Hide comment
@stantonk

stantonk Apr 22, 2014

y/w! totally forgot i had this until someone i work with found it by googling, haha...interwebs...

Owner

stantonk commented Apr 22, 2014

y/w! totally forgot i had this until someone i work with found it by googling, haha...interwebs...

@nksCH

This comment has been minimized.

Show comment
Hide comment
@nksCH

nksCH Jul 14, 2014

great man 👍

nksCH commented Jul 14, 2014

great man 👍

@byomkesh99

This comment has been minimized.

Show comment
Hide comment
@byomkesh99

byomkesh99 May 16, 2016

Thanks! rritoch

Adding ditto only change " --no-check-certificate"

!/bin/bash

Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/

yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall
/usr/local/bin/python2.7
set -o vi
wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
tar xf distribute-0.6.27.tar.gz
cd distribute-0.6.27
python2.7 setup.py install
/usr/local/bin/easy_install-2.7 virtualenv

Thanks! rritoch

Adding ditto only change " --no-check-certificate"

!/bin/bash

Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/

yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall
/usr/local/bin/python2.7
set -o vi
wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
tar xf distribute-0.6.27.tar.gz
cd distribute-0.6.27
python2.7 setup.py install
/usr/local/bin/easy_install-2.7 virtualenv

@philipherlambang

This comment has been minimized.

Show comment
Hide comment
@philipherlambang

philipherlambang Nov 1, 2016

you saved my day. Thanks!

you saved my day. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment