导入错误:在安装 PyLucene 期间无法导入名称库



我花了 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$ 

我也找不到图书馆。我该如何解决这个问题?当我遇到这种错误时,你能告诉我应该在哪里检查吗?

另外,我安装了安装工具 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

我正在尝试在Windows下编译JCC,我发现最新版本的setuptools1.1.6给出了您报告的导入错误。但是,在版本 0.6c11 中,可以找到库模块。

编辑:1.1.3 也有效。

似乎是一个愚蠢的问题,但您是否安装了安装工具?https://pypi.python.org/pypi/setuptools/0.6c11

相关内容

最新更新