我花了 5 个小时来解决这个问题,但我不能。在使用http://lucene.apache.org/pylucene/install.htmt安装 PyLucene 期间,我遇到了如下错误。
sanghee-m:jcc sanghee$ python setup.py build
found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework
Traceback (most recent call last):
File "setup.py", line 398, in <module>
main('--debug' in sys.argv)
File "setup.py", line 306, in main
from setuptools import Library
ImportError: cannot import name Library
sanghee-m:jcc sanghee$ python setup.py build --debug
found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework
Traceback (most recent call last):
File "setup.py", line 398, in <module>
main('--debug' in sys.argv)
File "setup.py", line 306, in main
from setuptools import Library
ImportError: cannot import name Library
sanghee-m:jcc sanghee$
我也找不到图书馆。我该如何解决这个问题?当我收到这种错误时,你能告诉我应该在哪里检查吗?
另外,我安装了 setuptools 1.1.6 并使用了 pylucene-4.4.0-1。
sanghee-m:jcc sanghee$ python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools