Note that there are some explanatory texts on larger screens.

plurals
  1. POInstall Xapian for Python 2.6 on CentOS 5.5
    text
    copied!<p>I'm using Django 1.2 for Python 2.6 on CentOS 5.5 and I'm trying to install Django Haystack with Xapian as the search backend. I've followed the installation instructions on <a href="http://docs.haystacksearch.org/dev/installing_search_engines.html#xapian" rel="nofollow">http://docs.haystacksearch.org/dev/installing_search_engines.html#xapian</a> and also the instructions for the RedHat Enterprise Linux RPM package on <a href="http://xapian.org/download" rel="nofollow">http://xapian.org/download</a>. Xapian has installed, but has attached itself to Python 2.4, which needs to be present in CentOS for other reasons. So, if I go into a 'python' shell and 'import xapian' it works correctly, but if I go into a 'python26' shell and 'import xapian' I get the error 'No module named Xapian'.</p> <p>I then tried creating a symlink in the python 2.6 site packages to Xapian in the python 2.4 site packages and this gave me the following error when trying to import xapian in the python 2.6 shell:<br> RuntimeWarning: Python C API version mismatch for module _xapian: This Python has API version 1013, module _xapian has version 1012.</p> <p>I've also tried to specify the python library to use when configuring xapian-core as seen on <a href="http://invisibleroads.com/tutorials/xapian-search-pylons.html#install-xapian-on-webfaction" rel="nofollow">http://invisibleroads.com/tutorials/xapian-search-pylons.html#install-xapian-on-webfaction</a>, so the command I used was:<br> ./configure PYTHON=/usr/bin/python2.6<br> then for installing xapian-bindings I used:<br> ./configure PYTHON=/usr/bin/python26 PYTHON_LIB=/usr/lib/python2.6 --with-python<br> This made no discernible difference so I'm a bit stuck at the moment. Does anyone have any ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload