yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64
install python 2.7
wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2 tar -xvjf Python-2.7.tar.bz2 cd Python* ./configure --prefix=/opt/python27 make make install vi ~/.bash_profile
replace PATH=$PATH:$HOME/bin
with PATH=$PATH:$HOME/bin:/opt/python27/bin
reload .bash_profile
source ~/.bash_profile echo "/opt/python27/lib" > /etc/ld.so.conf.d/python27.conf ldconfig
install setuptool
cd ~ wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg sh setuptools-0.6c11-py2.7.egg
install gevent
yum install libevent.x86_64 libevent-devel.x86_64 easy_install-2.7 greenlet wget http://pypi.python.org/packages/source/g/gevent/gevent-0.13.0.tar.gz tar -xvzf gevent-0.13.0.tar.gz cd gevent* python2.7 setup.py install
Are you sure this won\\\’t break any CentOS dependencies? I need Python => 2.5 installed but I\\\’m a bit afraid that this will break my other packages. Is there any way I could update using yum?
yes of course
nice article, keep the posts coming
Hello my friend, thanks for your how to.
I\\\\\\\\\\\\\\\’m getting this error:
Traceback (most recent call last):
File \\\\\\\\"<string>\\\\\\\\", line 1, in <module>
zipimport.ZipImportError: can\\\\\\\\\\\\\\\’t decompress data; zlib not available
When I try to run sh setuptools-0.6c11-py2.7.egg
Is there any help?
Thanks!
i think u not have a zlib package
u can install it with this command “yum install zlib.x86_64 zlib-devel.x86_64″
many thanks, worked for me, running centos 5.5 final 64 bit
[...] Theres a great tutorial on installing Python 2.7 on CentOS 5 here. [...]
It’s usefull. Thanks for posting!
[...] Theres a great tutorial on installing Python 2.7 on CentOS 5 here. [...]
Thank you for this. It saved me a lot of time. it would be nice if you added “-y” to your yum install lines. Also instead of calling vi just running “export PATH=${PATH}:/opt/python27/bin” so that this was a little more copy/paste friendly.
Alternatively, you could use sed to edit the bash_profile. Thank you again. Really a time-saver.
Thank you for this. It saved me a lot of time. it would be nice if you added \\"-y\\" to your yum install lines. Also instead of calling vi just running \\"export PATH=${PATH}:/opt/python27/bin\\" so that this was a little more copy/paste friendly.
Alternatively, you could use sed to edit the bash_profile. Thank you again. Really a time-saver.
What a joy to find such clear thinikng. Thanks for posting!
awesome tutorial, very well done.
Thank you!
Good tutorial. I want to compile and install plivo (an open source communication framework) after the installation of gevent. What commands i have to run. (I am newbie on centos). Following are the links for plivo:
git://github.com/plivo/plivo.git
https://github.com/plivo/plivo/raw/master/scripts/ez_setup.py
Similarly, if i have above distributions on my local drive, how I would compile and install them?
Thanks a lot, it was very helpful
using
./configure
instead of
./configure –prefix=/opt/python27
will give run python2.7 on default script python