Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install the Subversion SWIG Python libraries so that I can use them with Trac. The environment is RHEL5, and for some reason the RedHat repositories for yum are unavailable, so I had to install everything from RPMs.

I've installed all of the dependencies and Subversion itself (1.6.17), no hitch there. However, since RHEL comes with Python 2.4.3 installed, and since it says in several places that upgrading it may cause problems with parts of the OS that rely on it, I've installed Python 2.7 in addition, and not instead.

Now, when I try to install the subversion-python RPM (subversion-python-1.6.17-1.rhel5.x86_64.rpm), it uses the older Python version, and places all of the bindings there.

So the question is - how do I tell it to use the newer Python?

Things I've tried already:

  1. Replace the __python variable in /usr/lib/rpm/macros - when I run rpm -E%{__python} I get the correct version, but still no go.
  2. Copy the result directories (libsvn/* and svn/*) to the newer version - results in an error: undefined symbol: Py_InitModule4 (now reverted).

Any ideas?

share|improve this question

migrated from Oct 17 '11 at 5:29

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

The packages from the repo are built for a specific Python version and cannot be changed. You will need to find different packages or install from source.

share|improve this answer

There's several external repositories you could use for this. One I have used myself to install Python 2.6 is this one:

Just look for python26* for for all Python 2.6 packages available.

I don't know about Python 2.7 however... but I doubt you really need higher than 2.6 anyway.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .