-
Notifications
You must be signed in to change notification settings - Fork 3
PyLucene installation guide
These are steps you will need to run in order:
-
pushd jcc
-
Configure setup.py to match your machine's configuration.
-
python setup.py build
-
sudo python setup.py install
-
popd
-
Now you will need to configure the Makefile to match your environment. I will show you mine as a reference. There are several commented sections based on different environment. Since un-comment the one matching you configuration.
For example: I am running Ubuntu 14.04, Python 2.7.6, Oracle Java 7, setuptools 0.7
So mine looks like:
PREFIX_PYTHON=/usr ANT=JAVA_HOME=/usr/lib/jvm/java-7-oracle /usr/bin/ant PYTHON=$(PREFIX_PYTHON)/bin/python JCC=$(PYTHON) -m jcc --shared NUM_FILES=8
It is very important that jcc is compiled with the
--shared
flag to allow JCC and Python to share memory space for variables.Just as a sanity check make sure the top information is correct for version and locations:
VERSION=4.3.0-0 LUCENE_SVN_VER=HEAD LUCENE_VER=4.3.0 LUCENE_SVN=http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_3_0 PYLUCENE:=$(shell pwd) LUCENE_SRC=lucene-java-$(LUCENE_VER) LUCENE=$(LUCENE_SRC)/lucene
-
make
-
sudo make install
-
make test (This is not required but highly recommended)
The make process may take a while, so do not exit until it has completed it's work. This is very normal. You should now have a working copy of PyLucene install, basic tutorials all also included with the install.
Currently OpenJDK 1.7 is having problems with PyLucene so use Oracle Java 7. This code is tested for PyLucene 4.3.
If you still have questions you can check: http://lucene.apache.org/pylucene/documentation/install.html