By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,458 Members | 1,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,458 IT Pros & Developers. It's quick & easy.

default python when multiple python installation on the box

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.