default python when multiple python installation on the box

j_nwb j_nwb at yahoo.com
Tue Oct 24 16:42:57 EDT 2006


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



More information about the Python-list mailing list