liz
liz

Reputation: 1

PyLucene install: OSError: [Errno 20] Not a directory: 'build/_lucene'

I'm trying to install PyLucene 4.3.0-1 on OSX 10.8.4, Python 2.7, Java 1.6. Following the instructions on PyLucene's site (http://lucene.apache.org/pylucene/install.html) all seems well until, a minute or so into the 'sudo make install' I get an error that 'build/_lucene' is not a directory.

I'm totally stumped. There is a file 'build/_lucene' and a directory 'build/lucene'... I can't google up any similar problems!

Here's what is looks like - I do use the Enthought Python, but that doesn't seem to be the issue here.

/Users/liz/Library/Enthought/Canopy_64bit/User/bin/python -m jcc --shared --arch x86_64 --jar lucene-java-4.3.0/lucene/build/core/lucene-core-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/analysis/common/lucene-analyzers-common-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/memory/lucene-memory-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/highlighter/lucene-highlighter-4.3.0.jar --jar build/jar/extensions.jar --jar lucene-java-4.3.0/lucene/build/queries/lucene-queries-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/queryparser/lucene-queryparser-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/sandbox/lucene-sandbox-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/grouping/lucene-grouping-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/join/lucene-join-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/facet/lucene-facet-4.3.0.jar --jar lucene-java-4.3.0/lucene/build/suggest/lucene-suggest-4.3.0.jar --use_full_names --package java.lang java.lang.System java.lang.Runtime --package java.util java.util.Arrays java.util.Collections java.util.HashMap java.util.HashSet java.util.TreeSet java.lang.IllegalStateException java.lang.IndexOutOfBoundsException java.util.NoSuchElementException java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator --package java.util.concurrent java.util.concurrent.Executors --package java.util.regex --package java.io java.io.StringReader java.io.InputStreamReader java.io.FileInputStream --exclude org.apache.lucene.sandbox.queries.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;' --sequence java.util.AbstractList 'size:()I' 'get:(I)Ljava/lang/Object;' org.apache.lucene.index.IndexWriter:getReader --version 4.3.0 --module python/collections.py --module python/ICUNormalizer2Filter.py --module python/ICUFoldingFilter.py --module python/ICUTransformFilter.py --files 8 --install Traceback (most recent call last): File "/Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/liz/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/JCC-2.16-py2.7-macosx-10.6-x86_64.egg/jcc/main.py", line 107, in cpp.jcc(sys.argv) File "/Users/liz/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/JCC-2.16-py2.7-macosx-10.6-x86_64.egg/jcc/cpp.py", line 541, in jcc egg_info, extra_setup_args) File "/Users/liz/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/JCC-2.16-py2.7-macosx-10.6-x86_64.egg/jcc/python.py", line 1757, in compile copytree(os.path.join(output, extname), 'include') File "/Users/liz/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/JCC-2.16-py2.7-macosx-10.6-x86_64.egg/jcc/python.py", line 1745, in copytree for name in os.listdir(src): OSError: [Errno 20] Not a directory: 'build/_lucene'

Upvotes: 0

Views: 959

Answers (1)

caffeine.storm
caffeine.storm

Reputation: 187

I ran into a similar problem, albeit on Ubuntu 14.04, with pylucence 4.5.1-1, Python 2.7.6 and openjdk 1.7.

In the step before make install I ran make -j 5 instead of just make in an attempt to speed up the build. It seems, however, that the build was not able to keep from clobbering itself when it came to generating build/_lucene/.

Did you use multiple jobs when you invoked make?

My fix was to run make clean, then make, then sudo make install.

Upvotes: 2

Related Questions