Download the pre-created JCC and pylucene eggs for Mac from here .
Currently the latest versions are: JCC-2.8 and lucene-3.1.0 for python 2.6, so below I will use easy_install-2.6 and python2.6.
Install them:
$ sudo easy_install-2.6 JCC-*.egg $ sudo easy_install-2.6 lucene-*.egg
Test:
$ python2.6 >>> import jcc >>> import lucene Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.6/site-packages/lucene-3.1.0-py2.6-macosx-10.6-universal.egg/lucene/__init__.py", line 7, in <module> import _lucene ImportError: dlopen(/Library/Python/2.6/site-packages/lucene-3.1.0-py2.6-macosx-10.6-universal.egg/lucene/_lucene.so, 2): Library not loaded: @rpath/libjcc.dylib Referenced from: /Library/Python/2.6/site-packages/lucene-3.1.0-py2.6-macosx-10.6-universal.egg/lucene/_lucene.so Reason: image not found
If you get the above error, fix it just by creating a libjcc.dylib symbolic link in /usr/local/lib/ . libjcc.dylib should be inside site-packages/JCC-*.egg/ .
>>> jcc.__file__ '/Library/Python/2.6/site-packages/JCC-2.8-py2.6-macosx-10.7-intel.egg/jcc/__init__.pyc' >>> ^D $ ln -s /Library/Python/2.6/site-packages/JCC-2.8-py2.6-macosx-10.7-intel.egg/libjcc.dylib /usr/local/lib/ $ python2.6 >>> import jcc, lucene >>>
source share