473,657 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4252
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*******@gmai l.com" <pe*******@gmai l.com> wrote in message news:<11******* *************** @o13g2000cwo.go oglegroups.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
1206
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 right? Scott
4
1813
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 "/usr/sbin/redhat-switch-printer", line 84, in ? main() File "/usr/sbin/redhat-switch-printer", line 68, in main from switchprinter_gui import mainDialog File "/usr/share/redhat-switch-printer/switchprinter_gui.py", line
1
1600
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 interpreter and that of the Python provided by RedHat (just a little bench program would be sufficient) as I suspect the binary Python 2.3.4 (or just the Zope?) I have produced is very inefficient (very very slow!).
4
2305
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 bundle versions of PostgreSQL for the latest redhat. Is there going to be a RedHat 10? Or are we all supposed to choose a path of RH Enterprise vs Fedora Core? I have about 10 to 20 Redhat 9 machines in dev/qa/production that
2
1497
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 in my 7.3 environment. But they cannot be run at all now in the new system, I received the following error message when I try to run my applicatin: relocation error: /usr/lib/libmysqlclient.so.10: symbol errno, version GLIBC_2.0 not defined in...
15
2406
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 downloaded from ftp://ftp15.us.postgresql.org/binar...dhat/refhat-9/.
8
3896
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 Specify one or more of the following keywords, separated by spaces, to install DB2 products.
3
1843
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 well? Thank you, Max
8
2363
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 the old one since when i do 'rpm -e python', i get error like 'failed dependencies'. Thank you for any idea.
0
8394
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.