473,774 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

default python when multiple python installation on the box

HI
I have multiple python installations. 2.2, 2.3, 2.4. When I install a
new package (pygtk2) , it always install in python 2.3.
I changed the /usr/bin/python to be 2.4 binary. Still the same behavior.
How does rpms, determine which installation to update ? Is there a
file somewhere ?
I am running in to this on Fedora as well as CenOS.

Thanks
/J
Oct 24 '06 #1
2 1504
j_nwb schrieb:
I have multiple python installations. 2.2, 2.3, 2.4. When I install a
new package (pygtk2) , it always install in python 2.3.
I changed the /usr/bin/python to be 2.4 binary. Still the same behavior.
How does rpms, determine which installation to update ? Is there a
file somewhere ?
I am running in to this on Fedora as well as CenOS.
Not sure what you mean by package: RPM package or distutils package?
If RPM package: binary package or source package?

Binary RPM packages have the Python version compiled into their
extension modules, and you can't change that without recompilation.
In addition, they have the directory and file names hard-coded in
the RPM archive.

Source RPM packages have the Python version coded into their spec
file. You should read the spec file to find out what Python version
it uses.

Distutils packages use the Python version you use to run setup.py,
so you should be able to install either with "python2.4 setup.py",
or get a different Python selected by changing /usr/bin/python.
Since you specifically asked about RPMs, I guess distutils packages
are of no interest to you, though.

Regards,
Martin
Oct 24 '06 #2
Does not help my immediate situation, but this understanding definitely
helps.
Thanks

/J

Martin v. Löwis wrote:
j_nwb schrieb:
> I have multiple python installations. 2.2, 2.3, 2.4. When I install a
new package (pygtk2) , it always install in python 2.3.
I changed the /usr/bin/python to be 2.4 binary. Still the same behavior.
How does rpms, determine which installation to update ? Is there a
file somewhere ?
I am running in to this on Fedora as well as CenOS.

Not sure what you mean by package: RPM package or distutils package?
If RPM package: binary package or source package?

Binary RPM packages have the Python version compiled into their
extension modules, and you can't change that without recompilation.
In addition, they have the directory and file names hard-coded in
the RPM archive.

Source RPM packages have the Python version coded into their spec
file. You should read the spec file to find out what Python version
it uses.

Distutils packages use the Python version you use to run setup.py,
so you should be able to install either with "python2.4 setup.py",
or get a different Python selected by changing /usr/bin/python.
Since you specifically asked about RPMs, I guess distutils packages
are of no interest to you, though.

Regards,
Martin
Oct 24 '06 #3

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

Similar topics

29
11697
by: Catalin | last post by:
Can Python replace PHP? Can I use a python program to make an interface to a mysql 4.X database? If that's possible where can I find a tutorial?
11
97204
by: dmbkiwi | last post by:
I am new to this group, and relatively new to python programming, however, have encountered a problem I just cannot solve through reading the documentation, and searching this group on google. I have written a theme in python for the superkaramba theme engine on kde (see http://netdragon.sourceforge.net - if you are a kde/linux user, it is a great visual applet engine). I have uploaded it to www.kdelook.org for others to download and...
4
3849
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or less - during my own installation of Python 2.3 on Fedora Core 1 Linux for a friend of mine). Anyway, HTH, L.
3
3785
by: Matthias Baas | last post by:
Hi, are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? If I want to distribute a binary installer of an extension that contains C++ code, should I really include the msvcp71.dll in the package? It doesn't sound like a good idea to me if every package places another copy of this dll somewhere in the Python directory. Python 2.4 does install the C runtime (msvcr71.dll)...
1
1834
by: arorap | last post by:
Hi, I recently setup mod_python successfully and things work smooth. However, I do not remember telling mod_python where to find Python installation. There's not environment variable which gives that information. As such how does mod_python know where to find Python ? When I print sys.path in my scripts it contains my python installation folder. I'm wondering how does Apache/mod_python get this information ?
9
2635
by: Ed Leafe | last post by:
On Apr 21, 2008, at 1:05 PM, Daniel Fetchinson wrote: Don't most binary distributions include SQLite itself? I installed 2.5.2 on a new WinXP VM, and SQLite is working fine. -- Ed Leafe
0
9621
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
10267
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
10106
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
9914
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
8939
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4012
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
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.