I am trying to install PyLucene 3.0.3 on Ubuntu 10.04. It turned out to be pretty complicated, but so far I have:
- A setuptools patch that allows you to create JCC as indicated in PyLucene docs.
- Built-in JCC via: cd pylucene-3.0.3-1 / jcc; python setup.py build
- Built by Lucene 3.0.3 via ant, and installed the jar in / usr / share / java / lucene -core-3.0.3dev.jar. Please note: I have installed the default Lucene Ubuntu package installed in / usr / share / java / lucene -core-2.9.2.jar, which also symbolically refers to / usr / share / java / lucene -core.jar
Now I'm trying to "make" PyLucene, but I get an error:
cd lucene-java-3.0.3; -Dversion=3.0.3
/bin/sh: -Dversion=3.0.3: not found
make: *** [lucene-java-3.0.3/build/lucene-core-3.0.3.jar] Error 127
The pylucene-3.0.3-1 / doc / documentation / install.html file mentions βchange the Makefile to suit your environment,β but I'm not sure what that means. The makefile seems to contain the same Lucene version number as the one I installed. How else do I need to edit my makefile to create PyLucene?
Edit: after uncommenting the section in the makefile (thanks Torsten) for compiling under Ubuntu 8.10 (seriously, 8.10 ?!), most of it seemed to compile fine, but I still got the error. Several components reported BUILD SUCCESSFUL, but the final build was completed:
/usr/bin/python -m jcc --shared --jar lucene-java-3.0.3/build/lucene-core-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/snowball/lucene-snowball-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/analyzers/common/lucene-analyzers-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/regex/lucene-regex-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/memory/lucene-memory-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/highlighter/lucene-highlighter-3.0.3.jar --jar lucene-java-3.0.3/build/contrib/queries/lucene-queries-3.0.3.jar --jar build/jar/extensions.jar --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token --exclude org.apache.lucene.queryParser.TokenMgrError --exclude org.apache.lucene.queryParser.QueryParserTokenManager --exclude org.apache.lucene.queryParser.ParseException --exclude org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude org.apache.regexp.RegexpTunnel --python lucene --mapping org.apache.lucene.document.Document 'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties 'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer --version 3.0.3 --module python/collections.py --files 200 --build
/usr/bin/python: jcc is a package and cannot be directly executed
make: *** [compile] Error 1
source
share