473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to upgrade python on Redhat?

This question applies specifically to RHEL 3.0 (actually Whitebox), but
also generally to Redhat and probably pretty much every distribution
that uses python for distribution-related tasks (configuration
managers, rpm package management, yum, etc).

So I want to upgrade to python 2.4 on Whitebox 3.0. Ideally I would
like python to live in /usr/bin and replace the python 2.2 that ships
with RHEL entirely. This gets pretty infeasable when you consider how
many packages depend on python 2.2:

cd /usr/lib/python2.2/site-packages
rpm -qf * | sort | uniq
alchemist-1.0.27-1
authconfig-4.3.7-1
ethereal-0.10.3-0.30E.1
file Ft is not owned by any package
file _xmlplus is not owned by any package
kudzu-1.1.22.2-1
libuser-0.51.7-1
libxml2-python-2.5.10-6
mod_python-3.0.3-3.ent
newt-0.51.5-1
parted-1.6.3-29
pygtk2-1.99.16-8
pyOpenSSL-0.5.1-8
pyorbit-1.99.3-5
python-2.2.3-5
python-optik-1.4.1-2
pyxf86config-0.3.5-1
redhat-config-printer-gui-0.6.47.3.19-1
rhnlib-1.5-1.1.WB1
rhpl-0.110.4-1
rpm-python-4.2.2-0.14.WB1
up2date-4.3.19-1.WB1

As best I can tell, I have 2 options:

1) Install python 2.4 from source over /usr/bin/python. Rebuild *all*
of the packages listed above from srpms and reinstall them.

2) Give up and install python 2.4 in /usr/local. This leaves me in the
awkward situation of having to ensure that all our in-house scripts,
all the time use /usr/local/bin/python.

I don't suppose there is a simple, rpm package based approach to fixing
this?

Jul 18 '05 #1
2 4232
pe*******@gmail.com wrote:
This question applies specifically to RHEL 3.0 (actually Whitebox), but
also generally to Redhat and probably pretty much every distribution
that uses python for distribution-related tasks (configuration
managers, rpm package management, yum, etc).

So I want to upgrade to python 2.4 on Whitebox 3.0. Ideally I would
like python to live in /usr/bin and replace the python 2.2 that ships
with RHEL entirely. This gets pretty infeasable when you consider how
many packages depend on python 2.2:

cd /usr/lib/python2.2/site-packages
rpm -qf * | sort | uniq
alchemist-1.0.27-1
authconfig-4.3.7-1
ethereal-0.10.3-0.30E.1
file Ft is not owned by any package
file _xmlplus is not owned by any package
kudzu-1.1.22.2-1
libuser-0.51.7-1
libxml2-python-2.5.10-6
mod_python-3.0.3-3.ent
newt-0.51.5-1
parted-1.6.3-29
pygtk2-1.99.16-8
pyOpenSSL-0.5.1-8
pyorbit-1.99.3-5
python-2.2.3-5
python-optik-1.4.1-2
pyxf86config-0.3.5-1
redhat-config-printer-gui-0.6.47.3.19-1
rhnlib-1.5-1.1.WB1
rhpl-0.110.4-1
rpm-python-4.2.2-0.14.WB1
up2date-4.3.19-1.WB1

As best I can tell, I have 2 options:

1) Install python 2.4 from source over /usr/bin/python. Rebuild *all*
of the packages listed above from srpms and reinstall them.

2) Give up and install python 2.4 in /usr/local. This leaves me in the
awkward situation of having to ensure that all our in-house scripts,
all the time use /usr/local/bin/python.

I don't suppose there is a simple, rpm package based approach to fixing
this?

The solution is found on the download page, basically you get the
python2.4 rpm and install it alongside your existing python, and run
your in-house scripts with /usr/bin/env python2.4:

# Q) Is it safe to install these RPMs on a Red Hat system? Will they
over-write the system python and cause problems with other Red Hat
applications that expect a different version of Python?
# A) The RPMs that start with "python2.4" are built to not interfere
with the system Python. They install as "/usr/bin/python2.4" and will
not conflict with the system Python unless you are running on a system
that ships the a version of Python which has the same major/minor number.

To invoke the interpreter with these packages, you will explicitly have
to run "python2.4". Note that all Python RPMs provided by Python.org and
Red Hat provide a "/usr/bin/python2.4" (or similar, with major/minor
number), even if they also provide "/usr/bin/python". So, yes, it should
be safe.

Note that you may need to build and install a second copy of any
packages which you need access to with the supplemental version of
Python. You can build packages of these files for the Python 2.4
interpreters for packages which use Distutils, by using the command
"python2.4 setup.py bdist_rpm".
Jul 18 '05 #2
"pe*******@gmail.com" <pe*******@gmail.com> wrote in message news:<11**********************@o13g2000cwo.googleg roups.com>...

2) Give up and install python 2.4 in /usr/local. This leaves me in the
awkward situation of having to ensure that all our in-house scripts,
all the time use /usr/local/bin/python.


Or, as recommended, use...

#!/usr/bin/env python

....and make sure the scripts are run in an appropriately configured environment.

Paul
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Scott Chapman | last post by:
Does anynone have these available? I'd like to upgrade (hoping it doesn't break my Redhat install). If I upgrade, all my site-packages have to be reinstalled to the new site-packages directory...
4
by: tudor | last post by:
hello! I had python 2.2.1 so I upgraded to python 2.3.2, but all my applications using python (rh8) give errors now. I installed from src.rpm Traceback (most recent call last): File...
1
by: Vbfoo Bar | last post by:
Hello, To implement a Zope intranet on a linux RedHat ES 3, I had to install a Python 2.3.4 that I have compiled myself. I would like to compare the respective performance of this python...
4
by: D. Dante Lorenso | last post by:
This isn't entirely PG related, but... Does anyone know what the natural upgrade path from RedHat 9 is? I'm wondering if anyone on the PostgreSQL team is working with redhat to package and...
2
by: Ivan | last post by:
Hi all, I have just upgraded my system from redhat 7.3 to redhat 9.0, but I found that there are many problems for this update. I have a C application that originally can compiled and run properly...
15
by: Manuel Tejada | last post by:
Hello list This is my situation: My box: Pentium III, Red Hat 9.0 I was working fine with PostgreSQL 7.3.2. Recently I decided to upgrade it to PostgreSQL 7.4 installing the twelve rpms I...
8
by: shenanwei | last post by:
I have DB2 v8.1.0.0 currently on Redhat 8.0 box. Want to upgrade it to V8.2, downloaded FP10_MI00138_RTCL.tar from IBM. Extracted and run db2_install, get the following error. # ./db2_install ...
3
by: gmax2006 | last post by:
Hi, My RedHat Linux installation already has Python 2.3 on it. What is the easiest way to upgrade it to 2.4? I use ActiveState python in Windows. Is it the best distribution for Linux as...
8
by: yinglcs | last post by:
Hi, i am using red hat enterprise 4. It has python 2.3 installed. What is the best way to upgrade to python 2.4? I think one way is to compile python 2.4 from the source, but I can't remove...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.