Python 1.5.x vs Python 2.x.x

ToddW taw_usenet at yahoo.com
Wed Jan 2 18:35:53 EST 2002


Fernando Pérez <fperez528 at yahoo.com> wrote in message news:<9vr8gp$3af$1 at peabody.colorado.edu>...
> Stephen wrote:
> 
> 
> > I'm sat on a RedHat 7.2 box too and am very hesitant to upgrade to
> > Python 2.x for fear of breaking a lot of the RedHat-distributed
> > scripts, including the firewall.  The alternative seems to be to
> > install Python 2.1.1 without symlinking it to /usr/bin/python
> > ie. Leave Python 1.5.2 the default Python and then use the hash-bang
> > to explicitly call python 2.x (#!/usr/bin/python2) in my scripts.
> > Is this right ?
> 
> yes, this will work. You can install the python2 rpm alongside with 
> python1.5. Look into /usr/bin/python*, you'll see both side by side. The 
> trick is, python1.5 is the default, and *don't change that* (you'll break 
> everything if you do). But as long as you don't mind changing by hand 
> references to python2 in everything else you write or use, you'll be fine. 
> This is clumsy, and is why yesterday I wrote a detailed post on the issue 
> hoping to hear from the redhats for a reasonable  explanation. As far as I 
> can tell, their python distribution is simply broken. The problems can be 
> worked around, but it's an annoyance.
>
> > On this note, I tried installing expat-1.1-4tummy.src.rpm and
> > python2-2.1.1-3.src.rpm (following the instructions to 'rebuild'
> > it, as per http://www.python.org/2.1.1/rpms.html)
> > but where does the rebuilt python get installed ?
> > 
> > Afterwards, it claims the RPM is not installed
> > $ rpm -q python*rpm
> > package python2-2.1.1-3.src.rpm is not installed
> 
> query for the package name only, not the  full filename. The rpm querying is 
> tricky to use, fire up kpackage and just look at the  list, much easier.
> 
> > Thanks for any help,
> > 
> > Stephen
> 
> cheers


Use grep or egrep if you aren't sure of the name:
rpm -qa | grep ython



More information about the Python-list mailing list