[pylucene-dev] installing PyLucene JCC

Andi Vajda vajda at osafoundation.org
Thu Dec 13 17:01:03 PST 2007


On Thu, 13 Dec 2007, Chris Curvey wrote:

> Based on advice I received here, I'm trying to build and install the JCC
> flavor of PyLucene on Ubuntu.  But I'm finding the instructions a bit
> thin...
>
> Here's what I did so far:
>
> 1) Downloaded PyLucene for JCC and unpacked it
>
> Switch into the "jcc" subdirectory
>
> 2) Installed the Sun Java 5 JDK, and made it the default per the
> instructions in jcc/INSTALL.  (Note to future readers -- you may have to
> update the settings of LD_LIBRARY_PATH to match the version of the JDK that
> apt gets for you.)

On Linux, you can update the LFLAGS in jcc's setup.py to use
'-Wl,-rpath=...' instead of LD_LIBRARY_PATH.

> 3) Updated jcc/setup.py so that the includes file would find my JDK.  (The
> version thing again.)
> 3) Built jcc via "python setup.py build" and "python setup.py install"
>
> 4) Downloaded and installed Ant and made sure it's on my path.
> 5) Updated the Makefile so that PYTHON and JCC are pointing to the right
> place.
> 6) ran "make" to build, um, something.  It took a looong time.  But it
> finished successfully.
>
> And now, I'm sitting here wondering....what do I have to finish the
> installation so that I can "import PyLucene"?  Or should it be "import
> lucene", as it seems to be in the examples....

Well two or three things:
   - sudo make install
     that installs the lucene extension into python's site-packages
   - then you can run 'make test' to see if your build is sane
   - start python
     >>> import lucene               (not PyLucene)
     >>> initVM(lucene.CLASSPATH)    (to start the JVM)

Andi..


More information about the pylucene-dev mailing list