default python when multiple python installation on the box

"Martin v. Löwis" martin at
Tue Oct 24 21:35:40 CEST 2006

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,
so you should be able to install either with "python2.4",
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.


More information about the Python-list mailing list