Python 2.2 on Red Hat

A

Andy Jacobs

Hi all

I'm trying to install some anti spam software called ASK. This relies on
Python2.2 whereas my Cobalt RAQ4 is running 1.5.2 so I need to upgrade from
RPM.

I've done a search and everything for Python2.2 says that it's for Red Hat
7, 8 or 9. I'm running 6. I don't want to just go at this like a bull in a
china shop so wondered what the advice here might be.

Regards

Andy
 
J

Jorge Godoy

Andy Jacobs said:
I'm trying to install some anti spam software called ASK. This relies on
Python2.2 whereas my Cobalt RAQ4 is running 1.5.2 so I need to upgrade from
RPM.

I've done a search and everything for Python2.2 says that it's for Red Hat
7, 8 or 9. I'm running 6. I don't want to just go at this like a bull in a
china shop so wondered what the advice here might be.

You'll have to get the .src.rpm (SRPM), rebuild it and install the
resulting binary package.

Usually a lot of basic libraries change and I dunno if this change is
coincidnt with several glibc + gcc upgrades...
 
D

David Ripton

Andy Jacobs said:
I'm trying to install some anti spam software called ASK. This relies on
Python2.2 whereas my Cobalt RAQ4 is running 1.5.2 so I need to upgrade from
RPM.

I've done a search and everything for Python2.2 says that it's for Red Hat
7, 8 or 9. I'm running 6. I don't want to just go at this like a bull in a
china shop so wondered what the advice here might be.

RedHat uses Python 1.5.2 for key OS tools like the Anaconda installer.
Upgrading /usr/bin/python to something newer than 1.5.2 will break
them.

So you need to put a newer Python somewhere else.

My advice is to install modern Python (like 2.3.4), from source (it's
easy: standard ./configure; make; su; make install), under /usr/local.

Then make sure that ASK usess /usr/local/bin/python instead of
/usr/bin/python, by manipulating the PATH or a shebang line or
whatever. RedHat's tools are hardcoded to /usr/bin/python so putting
a second Python under /usr/local is safe.
 
R

Russell Blau

David Ripton said:
Andy Jacobs <[email protected]> wrote in message
So you need to put a newer Python somewhere else.

My advice is to install modern Python (like 2.3.4), from source (it's
easy: standard ./configure; make; su; make install), under /usr/local.

No, you need to "make altinstall", not "make install", to prevent having
python2.3 overwrite the system's built-in python symlink.

Although the advice above (as amended) is correct, it's also incredibly
cryptic for someone who is not a Linux sysadmin guru! Try reading the
README file in the Python source toplevel directory for somewhat more
helpful directions.
 
J

Jeff Shannon

David said:
RedHat uses Python 1.5.2 for key OS tools like the Anaconda installer.
Upgrading /usr/bin/python to something newer than 1.5.2 will break
them.

So you need to put a newer Python somewhere else.

Just for reference, Red Hat's standard method of dealing with this
issue was for RPMs to install newer versions of Python as 'python2', so
that invoking the standard 'python' (as their scripts do) gives you
1.5.2 but specifying 'python2' gives you the 2.x version.

I can't offer any suggestions about where to find a binary python2 RPM
for RH6, but this trick may be very helpful when you build your own from
source. (I'd be a bit reluctant to rely on path ordering and
environment juju to ensure that the correct Python version were
called... but maybe I'm just paranoid due to lesser familiarity.)

Jeff Shannon
Technician/Programmer
Credit International
 
T

Trent Mick

Andy said:
I'm trying to install some anti spam software called ASK. This relies on
Python2.2 whereas my Cobalt RAQ4 is running 1.5.2 so I need to upgrade from
RPM.

I've done a search and everything for Python2.2 says that it's for Red Hat
7, 8 or 9. I'm running 6. I don't want to just go at this like a bull in a
china shop so wondered what the advice here might be.

You could use ActivePython. There are builds for Linux that should work
on RedHat 6:
ftp://ftp.activestate.com/ActivePython/linux/2.3/ActivePython-2.3.4-233-linux2.2-libcpp3-ix86.tar.gz

Cheers,
Trent
 
D

David Ripton

Russell Blau said:
No, you need to "make altinstall", not "make install", to prevent having
python2.3 overwrite the system's built-in python symlink.

No. "make altinstall" is only needed if you want to put two versions
of Python in the same basedir. I suggested leaving /usr alone and
installing the new local Python in /usr/local. When you do that
there's no namespace clash, so no need to use altinstall.

Yes, if you want to put two Pythons in the same basedir, then
altinstall is handy. But not as bulletproof as using separate
basedirs. Try installing debug and non-debug builds of the same
Python version in the same basedir using altinstall to see what I
mean.

Robustness aside, letting the package manager handle /usr and putting
your local changes in /usr/local is The Right Thing To Do. RPM can't
scribble over changes not in its turf. The Filesystem Hierarchy
Standard is fundamentally sane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,048
Members
48,769
Latest member
Clifft

Latest Threads

Top