Install Xapian for Python 2.6 on CentOS 5.5

I am using Django 1.2 for Python 2.6 on CentOS 5.5, and I am trying to install Django Haystack with Xapian as a search engine. I followed the installation instructions for http://docs.haystacksearch.org/dev/installing_search_engines.html#xapian , as well as the instructions for the RedHat Enterprise Linux RPM package at http://xapian.org/download . Xapian installed but joined Python 2.4, which should be present in CentOS for other reasons. So, if I go into the python shell and import xapian, it works correctly, but if I go into the python26 shell and import xapian, I get the error "There is no module named Xapian".

Then I tried to create a symlink in python 2.6 site packages for Xapian in python 2.4 site packages, and this gave me the following error when trying to import xapian into python 2.6 shell:
RuntimeWarning: Python C API version mismatch for _xapian module: this Python has API version 1013, the _xapian module has version 1012.

I also tried to specify the python library to use when setting up xapian-core, as shown at http://invisibleroads.com/tutorials/xapian-search-pylons.html#install-xapian-on-webfaction , so the command I use:
. / configure PYTHON = / usr / bin / python2.6
then to install xapian-bindings I used:
. / configure PYTHON = / usr / bin / python26 PYTHON_LIB = / usr / lib / python2.6 --with-python
It didn't make a noticeable difference, so I'm a bit stuck right now. Does anyone have any ideas?

+4
source share
1 answer

When creating the xapian-bindings package, you will want to do ./configure --with-python PYTHON=/usr/bin/python2.6 It sounds like you tried to do it on xapian-core, which is not suitable.

+2
source

Source: https://habr.com/ru/post/1332884/


All Articles