Yep, just build your own python and put it somewhere else (something like /opt or /usr/local). You'll need to rebuild mod_python, when you do you can specify the new python location.
./configure --with-python=/path/to/python2.4
export PYTHONPATH=/opt/python2.6
export PATH=/opt/python2.6/bin:$PATH
And then configure
/ make
/ make install
the python-rsvg module (from gnome-python-desktop), and it should just work.
If you want just the rsvg module without the rest, you can use ./configure --disable-allbindings --enable-rsvg
.
And make sure you have the librsvg2-devel
package installed, or else the module won't build no matter how many --enables you give. :)
Update:
Clearly something is going wrong at the update #2 stage above, where ./configure
tells you that it's doing something other than what it says it's going to. Particularly, the metacity bindings are called out in the configure help as being poorly maintained.
I'm not quite sure what's wrong -- is there something helpful in the (long) output from configure? Alternately, you could try to use waf
instead of configure/make. Run:
./waf configure --enable-modules=rsvg
./waf
./waf install
(Noting that --disable-allbindings isn't necessary.)
The first line should tell you that only rsvg will be built.
Further Update:
With this approach, you're gonna need pygtk and pycairo built into your /opt/python2.6
tree. That may be why the configure is failing.
Best Answer
For more details about easy_install support with multiple versions of Python check out Multiple-Python-Versions found at packages.python.org.
Basically, easy_install and setuptools install libraries to the version of Python that is being used to run them. So it sounds like 2.4 is the version of Python being used when easy_install/setuptools is run. See the following question/answer on ServerFault: easy_install'ing under different Python version
It's possible that you could setup (or modify) a symlink for
/usr/bin/python
to point to the python install (2.6 I would assume) that you would like to use by default.