ImportError: cannot import name Library, during installing PyLucene

2013-10-11 Thread SangHee Kim
Hi everyone!

I have spent 5 hours to fix this problem but I can't. During installing
PyLucene withhttp://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.frameworkTraceback (most recent call
last):
  File "setup.py", line 398, in 
main('--debug' in sys.argv)
  File "setup.py", line 306, in main
from setuptools import LibraryImportError: cannot import name Library
sanghee-m:jcc sanghee$ python setup.py build --debug
found JAVAFRAMEWORKS =
/System/Library/Frameworks/JavaVM.frameworkTraceback (most recent call
last):
  File "setup.py", line 398, in 
main('--debug' in sys.argv)
  File "setup.py", line 306, in main
from setuptools import LibraryImportError: 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?

I uses setuptools 1.1.6 and pylucene-4.4.0-1.

-- 
SangHee Kim
http://goo.gl/LnpDX


Re: [VOTE] Release PyLucene 4.5.0-1

2013-10-11 Thread Andi Vajda


On Fri, 11 Oct 2013, Steve Rowe wrote:

I really have no idea where to start looking to figure out what's 
happening - I'm not a big python user - any ideas?


Would it be useful to package up my make'd directory and send it to you?


I don't know yet. Do you know which version of setuptools you have
installed ?

I'm currently battling an issue with the "third generation" setuptools,
v 1.1.6.
If you don't have something like 0.6something or 0.7 installed, please try 
that (for lack of any better ideas, sorry).


Andi..



Steve

On Oct 10, 2013, at 7:34 PM, Andi Vajda  wrote:


On Thu, 10 Oct 2013, Steve Rowe wrote:


Meant to send to the mailing lists:

Begin forwarded message:


From: Steve Rowe 
Subject: Re: [VOTE] Release PyLucene 4.5.0-1
Date: October 10, 2013 3:18:50 AM EDT
To: Andi Vajda 

Andi,

I thought I'd run 'make' and 'sudo make install' in two steps, so I checked, 
and bash 'history' agreed:

586  vi Makefile
587  make
588  sudo make install

I tried again, first rm -rf'ing the unpacked distribution, then unpacking, 
(skipping the jcc 'make' and 'sudo make install' this time), editing the 
Makefile, then running 'make', then 'sudo make install', and I got the same 
error - I suppose this is the most salient line:


The problem is that I can't even reproduce the error.
You're not the first one to report it but it usually "goes away" :-(
Stuck.

Andi..



-
No local packages or download links found for lucene==4.5.0
-

Steve

On Oct 10, 2013, at 2:59 AM, Andi Vajda  wrote:

Hi Steve,

On Thu, 10 Oct 2013, Steve Rowe wrote:


After make'ing and installing jcc (no setup.py changes required); uncommenting 
the first Mac OS X 10.6 section in Makefile (I have OS X 10.8.5, with stock 
Python 2.7.2 and Oracle Java 1.7.0_25); and finally make'ing pylucene: 'sudo 
make install' fails - here's the tail end of the output:

-
writing build/bdist.macosx-10.8-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg' and adding 
'build/bdist.macosx-10.8-x86_64/egg' to it
removing 'build/bdist.macosx-10.8-x86_64/egg' (and everything under it)
Processing lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
creating 
/Library/Python/2.7/site-packages/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
Extracting lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg to 
/Library/Python/2.7/site-packages
Removing lucene 4.4.0 from easy-install.pth file
Adding lucene 4.5.0 to easy-install.pth file

Installed 
/Library/Python/2.7/site-packages/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
Processing dependencies for lucene==4.5.0
Searching for lucene==4.5.0
Reading http://pypi.python.org/simple/lucene/
Couldn't find index page for 'lucene' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for lucene==4.5.0
error: Could not find suitable distribution for 
Requirement.parse('lucene==4.5.0')


This error has been a problem for a while.
You need to make, then make install, in two steps.
Otherwise, when 'make install' in pylucene from clean, this error seems to 
happen. I don't know of a fix.

Andi..


make: *** [install] Error 1
-

I've included the entire 'sudo make install' output here: 


Steve

On Oct 8, 2013, at 1:00 AM, Andi Vajda  wrote:



The PyLucene 4.5.0-1 release tracking the recent release of Apache Lucene 4.5.0 
is ready.

A release candidate is available from:
http://people.apache.org/~vajda/staging_area/

A list of changes in this release can be seen at:
http://svn.apache.org/repos/asf/lucene/pylucene/branches/pylucene_4_5/CHANGES

PyLucene 4.5.0 is built with JCC 2.17 included in these release artifacts:
http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc/CHANGES

A list of Lucene Java changes can be seen at:
http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_5_0/lucene/CHANGES.txt

Please vote to release these artifacts as PyLucene 4.5.0-1.

Thanks !

Andi..

ps: the KEYS file for PyLucene release signing is at:
http://svn.apache.org/repos/asf/lucene/pylucene/dist/KEYS
http://people.apache.org/~vajda/staging_area/KEYS

pps: here is my +1













Re: [VOTE] Release PyLucene 4.5.0-1

2013-10-11 Thread Steve Rowe
Andi,

I really have no idea where to start looking to figure out what's happening - 
I'm not a big python user - any ideas?

Would it be useful to package up my make'd directory and send it to you?

Steve

On Oct 10, 2013, at 7:34 PM, Andi Vajda  wrote:

> On Thu, 10 Oct 2013, Steve Rowe wrote:
> 
>> Meant to send to the mailing lists:
>> 
>> Begin forwarded message:
>> 
>>> From: Steve Rowe 
>>> Subject: Re: [VOTE] Release PyLucene 4.5.0-1
>>> Date: October 10, 2013 3:18:50 AM EDT
>>> To: Andi Vajda 
>>> 
>>> Andi,
>>> 
>>> I thought I'd run 'make' and 'sudo make install' in two steps, so I 
>>> checked, and bash 'history' agreed:
>>> 
>>> 586  vi Makefile
>>> 587  make
>>> 588  sudo make install
>>> 
>>> I tried again, first rm -rf'ing the unpacked distribution, then unpacking, 
>>> (skipping the jcc 'make' and 'sudo make install' this time), editing the 
>>> Makefile, then running 'make', then 'sudo make install', and I got the same 
>>> error - I suppose this is the most salient line:
> 
> The problem is that I can't even reproduce the error.
> You're not the first one to report it but it usually "goes away" :-(
> Stuck.
> 
> Andi..
> 
>>> 
>>> -
>>> No local packages or download links found for lucene==4.5.0
>>> -
>>> 
>>> Steve
>>> 
>>> On Oct 10, 2013, at 2:59 AM, Andi Vajda  wrote:
 Hi Steve,
 
 On Thu, 10 Oct 2013, Steve Rowe wrote:
 
> After make'ing and installing jcc (no setup.py changes required); 
> uncommenting the first Mac OS X 10.6 section in Makefile (I have OS X 
> 10.8.5, with stock Python 2.7.2 and Oracle Java 1.7.0_25); and finally 
> make'ing pylucene: 'sudo make install' fails - here's the tail end of the 
> output:
> 
> -
> writing build/bdist.macosx-10.8-x86_64/egg/EGG-INFO/native_libs.txt
> creating dist
> creating 'dist/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg' and adding 
> 'build/bdist.macosx-10.8-x86_64/egg' to it
> removing 'build/bdist.macosx-10.8-x86_64/egg' (and everything under it)
> Processing lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
> creating 
> /Library/Python/2.7/site-packages/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
> Extracting lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg to 
> /Library/Python/2.7/site-packages
> Removing lucene 4.4.0 from easy-install.pth file
> Adding lucene 4.5.0 to easy-install.pth file
> 
> Installed 
> /Library/Python/2.7/site-packages/lucene-4.5.0-py2.7-macosx-10.8-x86_64.egg
> Processing dependencies for lucene==4.5.0
> Searching for lucene==4.5.0
> Reading http://pypi.python.org/simple/lucene/
> Couldn't find index page for 'lucene' (maybe misspelled?)
> Scanning index of all packages (this may take a while)
> Reading http://pypi.python.org/simple/
> No local packages or download links found for lucene==4.5.0
> error: Could not find suitable distribution for 
> Requirement.parse('lucene==4.5.0')
 
 This error has been a problem for a while.
 You need to make, then make install, in two steps.
 Otherwise, when 'make install' in pylucene from clean, this error seems to 
 happen. I don't know of a fix.
 
 Andi..
 
> make: *** [install] Error 1
> -
> 
> I've included the entire 'sudo make install' output here: 
> 
> 
> Steve
> 
> On Oct 8, 2013, at 1:00 AM, Andi Vajda  wrote:
> 
>> 
>> The PyLucene 4.5.0-1 release tracking the recent release of Apache 
>> Lucene 4.5.0 is ready.
>> 
>> A release candidate is available from:
>> http://people.apache.org/~vajda/staging_area/
>> 
>> A list of changes in this release can be seen at:
>> http://svn.apache.org/repos/asf/lucene/pylucene/branches/pylucene_4_5/CHANGES
>> 
>> PyLucene 4.5.0 is built with JCC 2.17 included in these release 
>> artifacts:
>> http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc/CHANGES
>> 
>> A list of Lucene Java changes can be seen at:
>> http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_5_0/lucene/CHANGES.txt
>> 
>> Please vote to release these artifacts as PyLucene 4.5.0-1.
>> 
>> Thanks !
>> 
>> Andi..
>> 
>> ps: the KEYS file for PyLucene release signing is at:
>> http://svn.apache.org/repos/asf/lucene/pylucene/dist/KEYS
>> http://people.apache.org/~vajda/staging_area/KEYS
>> 
>> pps: here is my +1
> 
> 
>>> 
>> 
>> 



Re: ImportError: cannot import name Library, during installing PyLucene

2013-10-11 Thread Andi Vajda


On Fri, 11 Oct 2013, SangHee Kim wrote:


Hi everyone!

I have spent 5 hours to fix this problem but I can't. During installing
PyLucene withhttp://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.frameworkTraceback (most recent call
last):
 File "setup.py", line 398, in 
   main('--debug' in sys.argv)
 File "setup.py", line 306, in main
   from setuptools import LibraryImportError: cannot import name Library


Indeed, there are two problems with setuptools 1.1.6, apparently:
  1. the Library class is only accessible via setuptools.extension
  2. the logic in setuptools.command.build_ext patching in darwin-specific
 options for building a shared library into _CONFIG_VARS is broken

I added code to JCC's setup.py to workaround both issues.
This is checked into rev 1531420 in pylucene's trunk.

Please, refresh your copy of JCC from pylucene's trunk (still called 2.17), 
rebuild and reinstall it and try your pylucene 4.4.0 build again.

Please, let me know if this solves the problem for you as well.

Andi..


Re: [VOTE] Release PyLucene 4.5.0-1

2013-10-11 Thread Andi Vajda


On Mon, 7 Oct 2013, Andi Vajda wrote:

The PyLucene 4.5.0-1 release tracking the recent release of Apache Lucene 
4.5.0 is ready.


A release candidate is available from:
http://people.apache.org/~vajda/staging_area/

A list of changes in this release can be seen at:
http://svn.apache.org/repos/asf/lucene/pylucene/branches/pylucene_4_5/CHANGES

PyLucene 4.5.0 is built with JCC 2.17 included in these release artifacts:
http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc/CHANGES

A list of Lucene Java changes can be seen at:
http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_4_5_0/lucene/CHANGES.txt

Please vote to release these artifacts as PyLucene 4.5.0-1.


I'm calling off this vote as a bug was found with building JCC 2.17 with 
setuptools 1.1.6. This bug is now fixed and pending verification.

It's worth waiting and producing another release candidate for this.

Andi..



Thanks !

Andi..

ps: the KEYS file for PyLucene release signing is at:
http://svn.apache.org/repos/asf/lucene/pylucene/dist/KEYS
http://people.apache.org/~vajda/staging_area/KEYS

pps: here is my +1