Epicserve

Installing Xapian on OSX with Python Bindings

October 16, 2010 | 6:23 p.m. PDT

I needed to install Xapian for a Django project I was working on for work the other day. I searched the internet for installation instructions I couldn't find anything that was as straight forward and to the to point, so I decided to keep install notes and share them so I would have them for next time I needed them and so hopefully someone doing a search would be able to find them.

1. Install Xapian.

The easiest way to install Xapian is to use Homebrew. Homebrew is a package manager for UNIX/Linux applications and so far is the best one I've found for OSX. There are installation instructions on how to install Homebrew if you haven't installed it already.

$ brew install xapian

Find out what version it installed so you no what bindings you'll need.

$ brew info xapian

2. Compile the bindings

Download the bindings you need that match the version of Xapian you installed in the first step.

If you're using virtualenv then make sure you activate your virtual environment before compiling the bindings.

$ tar -zxvf xapian-bindings-x.x.x.tar.gz
$ cd xapian-bindings-x.x.x
$ ./configure --with-python
$ make
$ make install

Related tags: Django, python

Comments

Oliver George
1.   At 7:46 p.m. PDT on Aug. 11, 2011, Oliver George wrote:

Thanks. This is exactly what I needed.

Brent O'Connor
2.   At 2:23 a.m. PDT on Aug. 12, 2011, Brent O'Connor wrote:

No Problem! :)

Mr. V
3.   At 2:09 p.m. PST on Dec. 23, 2011, Mr. V wrote:

Homebrew is so awesome! Thank you for sharing! Saved me many hours of roaming the internet!

Edmund
4.   At 7:06 a.m. PDT on Aug. 8, 2012, Edmund wrote:

You can now use 'brew install xapian --python' to do it all.

Brent O'Connor
5.   At 10:16 a.m. PDT on Aug. 8, 2012, Brent O'Connor wrote:

Thanks Edmund for the update. I don't think that option was available when I added this post, but it's good to know that works now.

niels
6.   At 3:47 a.m. PST on Dec. 18, 2012, niels wrote:

Thanks Brent,

Very usefull.

tim
7.   At 11:45 a.m. PDT on June 9, 2014, tim wrote:

$brew install xapian --with-python worked for me just now.

Charles H. Leggett
8.   At 6:46 a.m. PDT on June 28, 2014, Charles H. Leggett wrote:

Also, be sure that you are using the homebrew installed version of python:

$ brew install python $ which python /usr/local/bin/python $ brew install xapian --with-python

Dorothyjelf
9.   At 4:07 p.m. PST on Dec. 10, 2014, Dorothyjelf wrote:

?? ????????? www.epicserve.com ! ?? ???? ?????????? ??? ????????? Moderator ?????? ????????? ?????????? ?????????? ?? ???????? ? ?????? ??????? ??? ???????

http://dngqof.sed4admin.ru/img/ms.png

???? ????

??? ?? ??? ??????? ?? ???????? ??????: ????? ??????? ??????? ??????? ??????? ?????? 2014 ?????? ?????? ????????? ??????? ??????? ??????? ??????? ??????? ??????? ?????? ???? ??????? ????????? ??? ?????? ????? ????????? 2014 ???? ???????? ????????? ??????? ???????? ??????? 2014 ?????????? ??????? ??????? ??????? ????? ?????? ???? 2014 ?????????? ???????? ????????? ??? ?????? ??????? ??? 2014 ?????????? ????? ????????? ??????? ?????? ?????? ????????? ??????? ???????? ??????? ??? ?????? ???????? ??????? ???????? ??????? ????? ????????? 2013

Post Your Comment

(Optional & Not Displayed)

(Optional)


(allowed tags - strong, em, cite, & code)

Post Guidelines

Please be considerate of others. Keep comments relevant. Content deemed inappropriate or offensive may be edited and/or deleted. Email addresses are never displayed.

Line breaks and paragraphs are automatically converted — no need to use p or br/. Quotes, apostrophes, and double-dashes are automatically converted to smart punctuation. Be careful when copying and pasting portions of entries or other comments.

Links can be created using the standard <a href="http://url">urlName</a>. The following inline HTML elements may also be used: strong, em, cite, & code. The title attribute is allowed within any element. All other code will get removed before posting.