best way to upgrade from default Python 2.4 to Python 2.6?
On Tue, May 8, 2012 at 8:09 AM, Rogelio <scubacuda@gmail.com> wrote:
> What is the best way to upgrade to Python 2.6 from the default Python 2.4.
>
> I'm running CentOS 5 --> Linux mybox.domain.com 2.6.18-238.9.1.el5 #1
> SMP Tue Apr 12 18:10:13 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
>
> I've read these horror stories online and don't want to break yum.
I installed python 2.7 on my CentOS-5 box by following this:
Akemi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
05-10-2012, 07:28 PM
Jesus del Valle
best way to upgrade from default Python 2.4 to Python 2.6?
>
> > What is the best way to upgrade to Python 2.6 from the default Python
> 2.4.
>
> > I've read these horror stories online and don't want to break yum.
>
> Hi. At least there are 2 ways that I have tried and work.
The first:
yum install gcc tcl tk sqlite-devel readline-devel gdbm-devel
yum install tkinter ncurses-devel libdbi-devel tk-devel zlib-devel
yum install openssl-devel bzip2-devel
cd /opt
# Python 2.7 so django and mod_wsgi work.
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzvf Python-2.7.3.tgz
./configure
make
make altinstall prefix=/opt/python2.7.3
cd /opt
# Use a link for easier administration if you need to upgrade python2.7
later.
ln -s /opt/python2.7.3 /opt/python2.7
# Add this alias to your /etc/bashrc file for all users or your ~/.bashrc
file for yourself.
alias python2.7='/opt/python2.7/bin/python2.7'
make altinstall will install the new Python as Python2.7; it will not
collide with your default Python (2.4.x in CentOS 5.x, 2.6.6 in CentOS
6.2). You run it using "python2.7" instead of "python".
The second uses virtualenv as environment manager (
http://code.activestate.com/pypm/virtualenv/). I use it for a particular
application, again no conflict with Python 2.4 under CentOS 5.6/7/8, or
Python 2.6 in CentOS 6.2. These are the versions I have tried.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos