سؤال

I have spent 5 hours to fix this problem but I can't. During installing PyLucene with http://lucene.apache.org/pylucene/install.htmt , I faced with a error like follwing.

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$ 

I can't find Library also. How can I solve this problme? Can you let me know where should I check when I get this kind of error?

Also, I installed setuptools 1.1.6 and used 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
هل كانت مفيدة؟

المحلول

I am trying to compile JCC under windows, and I found that the latest version of setuptools, 1.1.6, gives the import error you reported. However with version 0.6c11 the Library module is found.

Edit: 1.1.3 also works.

نصائح أخرى

it may seem like a stupid question but do you have the setuptools installed? https://pypi.python.org/pypi/setuptools/0.6c11

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top