Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save carymrobbins/9138620 to your computer and use it in GitHub Desktop.
Save carymrobbins/9138620 to your computer and use it in GitHub Desktop.
Install xapian in a virtualenv on Mac OS X using Homebrew.
apt-get install zlib1g-dev
apt-get install g++
export VENV=$VIRTUAL_ENV
mkdir $VENV/packages && cd $VENV/packages
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz
tar xzvf xapian-core-1.0.16.tar.gz
tar xzvf xapian-bindings-1.0.16.tar.gz
cd $VENV/packages/xapian-core-1.0.16
./configure --prefix=$VENV && make && make install
export LD_LIBRARY_PATH=$VENV/lib
cd $VENV/packages/xapian-bindings-1.0.16
./configure --prefix=$VENV --with-python && make && make install
python -c "import xapian"
@nffdiogosilva
Copy link

Thanks a lot! This help me a lot. I was having a hard time configuring the xapian inside a virtualenv ;)

@elhachimi
Copy link

Thanks, it's working but had to replace line 24 with :
cd $VENV/packages/xapian-bindings-*

@renejesusgv
Copy link

In my case I had to replace line 22 with:
tar xzvf $(ls $(brew --cache)/xapian-*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment