Installing Python 2.4 on Linux
Edward Diener
eldiener_no_spam_here at earthlink.net
Fri Apr 8 12:34:30 EDT 2005
David Fraser wrote:
> Edward Diener wrote:
>
>> I can install Python 2.4 on the Fedora 3 Linux system, but after I do
>> a number of Linux utilities and commands, like yum, stop working
>> because they were dependent on the Python 2.3 installation. What
>> happens is that Python 2.4 replaces the /usr/bin/python module with
>> the Python 2.4 version. If I replace /usr/bin/python with the Python
>> 2.3 version executable, which is still on my system, that all the
>> aforesaid modules depend on, they start working again, but I can no
>> longer execute modules, like IDLE, which was part of my Python 2.4
>> distribution.
>>
>> What is the solution to this ? The operating system was installed with
>> Python 2.3 and the development libraries but no tools, doc, or
>> otherwise. I have installed Python 2.4 with all the RPMs and copied
>> down the Python 2.4 documentation to my machine ( since
>> python24-docs.rpm gives one very little ). I would naturally like to
>> use Python 2.4 without killing all the commands that depend on Python
>> 2.3. No doubt these commands have their modules in the site libraries
>> for Python 2.3. Of course I would love to update these dependencies to
>> use Python 2.4 but newer RPMs for these commands do not exist.
>>
>> I do not know whether this is a Python problem or a Fedora 3 problem
>> but I thought I would ask here first and see if anybody else had the
>> same problem. I imagine the problem might exist on other Linux systems.
>
>
> Actually the Fedora RPMS supplied on the Python website are fine:
> http://www.python.org/2.4.1/rpms.html
> Quoting from that page:
>
>> # 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".
>
>
> This is by far the preferred way to install a different version of
> Python to the default version provided with a distribution, as you don't
> then conflict with packages that require the default version.
I do have a separate package installed for Python2.4 and it coexists
with Python2.3. The real problem is that a great number of other
packages, which are initially part of the system, depend on Python2.3 so
I must leave /usr/bin/python as Python2.3. I do not know of a way to
reinstall these other packages to use Python2.4 instead. Does the line
above, "python2.4 setup.py bdist_rpm" mean that I am supposed to run
this against each of these other package's rpm files and substitute for
"bdist_rpm" the name of the rpm file ?
>
> Also, it is better to do it like this using real packages than to rename
> files manually. I have used the above successfully on Fedora Core 3 (and
> other similar versions on other distro versions), if it doesn't work for
> you there is a source RPM available to rebuild from
Is "bdist_rpm" the source rpm for these packages which currently depend
on Python2.3 ?
Further help getting my Fedora 3 packages which depend on Python2.3 to
use Python2.4 would be appreciated.
More information about the Python-list
mailing list