Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Mon, 10 Aug 2009, KK wrote:


As I mentioned earlier jcc got installed to dist-packages sub-directory of
python2.6, instead of site-packages,  and modifying the Makefile to reflect
that was not working porperly, so i simply created a sym link in
/usr/lib/python2.6 wiht a name "site-packages" and made it point to the
actual jcc installation (rather, faulty in my case) i.e
/usr/local/lib/python2.6/dist-packages.


You're making your system harder to debug by doing this. You should let 
Python use the same logic to find jcc (with -m) than was used to install it.



Then I used the normal process of
installation, make and make install without any errors. Importing lucene is
not giving any errors( so far) and i guess we've to load JVM before doing
anything else, right? using the lucene.initVM(lucene.CLASSPATH) statement.


If you don't use initVM() before anything else, you'll get an error.


And yes I've to add the ld path to my .bashrc file this ways, i guess this
is okey ( its working fine, without this it was giving errors saying
libjava.so not found), this is what i did:
 export
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/i386/:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:$LD_LIBRARY_PATH


It's ok but using LD_LIBRARY_PATH a security issue. It's better to link the 
executables with -rpath as is done by default in jcc's setup.py.



Finally I'm done installing PyLucene on my box after fighting for 3-4 days.
Sounds stupid?Yes, but true in my case.


Thank you very much @ Christian & Andi


You're welcome !

Andi..



--KK


On Mon, Aug 10, 2009 at 4:37 PM, KK  wrote:


Yes, jcc is under dist-packages.
I think I should comment the lines I commented out for linux as we're
going to  provide all those details from the command line, right?
I did the same and ruinning the commad you mentioned gave me the following
errors:

k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$ make ANT=ant
PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m jcc.__main__"
NUM_FILES=2
CFLAGS= /usr/bin/python2.6 -m jcc.__main__ --jar
lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
--jar build/jar/extensions.jar --package java.lang java.lang.System
java.lang.Runtime java.lang.Boolean java.lang.Byte java.lang.Character
java.lang.Integer java.lang.Short java.lang.Long java.lang.Double
java.lang.Float --package java.util java.text.SimpleDateFormat --package
java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --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
org.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.2.0-578217
--files 2 --build
/usr/bin/python2.6: libjava.so: cannot open shared object file: No such
file or directory
make: *** [compile] Error 1
k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$

Any idea on how to resolve this error?

Thanks,
KK.


On Mon, Aug 10, 2009 at 4:25 PM, Christian Heimes wrote:


KK schrieb:


Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory
i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:




[...]

 This cleary says that there is no __init__.py file, in fact as I

mentioned
earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.



Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you
shouldn't use an absolute path to call JCC. I suggest you use the python2.6
as interpreter and "-m jcc.__main__" as JCC argument:

make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m
jcc.__main__" NUM_FILES=2

Christian








Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Mon, 10 Aug 2009, KK wrote:


Yes, jcc is under dist-packages.
I think I should comment the lines I commented out for linux as we're
going to  provide all those details from the command line, right?
I did the same and ruinning the commad you mentioned gave me the following
errors:

k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$ make ANT=ant
PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m jcc.__main__"
NUM_FILES=2
CFLAGS= /usr/bin/python2.6 -m jcc.__main__ --jar
lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
--jar build/jar/extensions.jar --package java.lang java.lang.System
java.lang.Runtime java.lang.Boolean java.lang.Byte java.lang.Character
java.lang.Integer java.lang.Short java.lang.Long java.lang.Double
java.lang.Float --package java.util java.text.SimpleDateFormat --package
java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --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
org.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.2.0-578217
--files 2 --build
/usr/bin/python2.6: libjava.so: cannot open shared object file: No such file
or directory


This means that you probably got the paths to java in jcc's setup.py wrong 
or that you didn't use -rpath in which case you need to set LD_LIBRARY_PATH 
accordingly. The linux defaults in jcc's setup.py use -rpath.


Andi..


make: *** [compile] Error 1
k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$

Any idea on how to resolve this error?

Thanks,
KK.

On Mon, Aug 10, 2009 at 4:25 PM, Christian Heimes  wrote:


KK schrieb:


Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory
i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:




[...]

 This cleary says that there is no __init__.py file, in fact as I mentioned

earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.



Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you
shouldn't use an absolute path to call JCC. I suggest you use the python2.6
as interpreter and "-m jcc.__main__" as JCC argument:

make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m
jcc.__main__" NUM_FILES=2

Christian





Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Mon, 10 Aug 2009, Christian Heimes wrote:


KK schrieb:

Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:



[...]


This cleary says that there is no __init__.py file, in fact as I mentioned
earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.


Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you shouldn't 
use an absolute path to call JCC. I suggest you use the python2.6 as 
interpreter and "-m jcc.__main__" as JCC argument:


make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m 
jcc.__main__" NUM_FILES=2


Yes, just use the settings example for Python 2.6.2 in PyLucene's Makefile. 
They invoke JCC correctly, using the "-m jcc.__main__" flag.


#JCC=$(PYTHON) -m jcc.__main__ --shared

Andi..


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Mon, 10 Aug 2009, KK wrote:


For "open-jdk" my setup.py file is like this:

import os, sys
from distutils.core import setup, Extension

# Add or edit the entry corresponding to your system in the INCLUDES and
# LFLAGS dictionaries below. These entries are used to build JCC _and_ are
# used by JCC to drive compiling and linking via distutils the extensions it
# generated code for.
# The key for your system is determined by sys.platform.

INCLUDES = {
   'darwin':
['/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers'],
   'linux2': ['/usr/lib/jvm/java-6-openjdk/include/',
  '/usr/lib/jvm/java-6-openjdk/include/linux'],
   'win32': ['o:/Java/jdk1.6.0_02/include',
 'o:/Java/jdk1.6.0_02/include/win32'],
}

LFLAGS = {
   'darwin': ['-framework', 'JavaVM'],
   'linux2': ['-L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/', '-ljava'],
   'win32': ['/LIBPATH:o:/Java/jdk1.6.0_02/lib', 'jvm.lib']
}

and running the build gave me the following error,

kk-laptop:~/softies/socs/PyLucene-2.2.0-1/jcc$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/jcc
copying jcc/cpp.py -> build/lib.linux-i686-2.6/jcc
copying jcc/config.py -> build/lib.linux-i686-2.6/jcc
copying jcc/python.py -> build/lib.linux-i686-2.6/jcc
copying jcc/__init__.py -> build/lib.linux-i686-2.6/jcc
creating build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/jcc.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/macros.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JArray.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.h -> build/lib.linux-i686-2.6/jcc/sources
running build_ext
building 'jcc._jcc' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/jcc
creating build/temp.linux-i686-2.6/jcc/sources
creating build/temp.linux-i686-2.6/_jcc
creating build/temp.linux-i686-2.6/_jcc/java
creating build/temp.linux-i686-2.6/_jcc/java/util
creating build/temp.linux-i686-2.6/_jcc/java/lang
creating build/temp.linux-i686-2.6/_jcc/java/lang/reflect
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/lib/jvm/java-6-openjdk/include/
-I/usr/lib/jvm/java-6-openjdk/include/linux -I_jcc -Ijcc/sources
-I/usr/include/python2.6 -c jcc/sources/jcc.cpp -o
build/temp.linux-i686-2.6/jcc/sources/jcc.o -DPYTHON
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
jcc/sources/jcc.cpp:29:20: error: Python.h: No such file or directory


You're missing Python.h, the main Python header file.
To build Python extensions, you need to install the relevant linux package.
On some distros it is called python-dev.

Andi..


jcc/sources/jcc.cpp:30:26: error: structmember.h: No such file or directory
In file included from jcc/sources/jcc.cpp:32:
jcc/sources/JCCEnv.h:215: error: ?PyObject? has not been declared
jcc/sources/JCCEnv.h:216: error: ISO C++ forbids declaration of ?PyObject?
with no type
jcc/sources/JCCEnv.h:216: error: ?PyObject? declared as a ?virtual? field
jcc/sources/JCCEnv.h:216: error: expected ?;? before ?*? token
jcc/sources/JCCEnv.h:217: error: ?PyObject? has not been declared
In file included from _jcc/java/lang/Object.h:28,
from jcc/sources/JArray.h:32,
from _jcc/java/lang/Class.h:28,
from jcc/sources/jcc.cpp:33:
jcc/sources/JObject.h:78: error: ?PyObject_HEAD? does not name a type
jcc/sources/JObject.h:82: error: ?PyTypeObject? does not name a type
In file included from jcc/sources/JArray.h:32,
from _jcc/java/lang/Class.h:28,
from jcc/sources/jcc.cpp:33:
_jcc/java/lang/Object.h:51: error: ?PyTypeObject? does not name a type
_jcc/java/lang/Object.h:55: error: ?PyObject_HEAD? does not name a type
_jcc/java/lang/Object.h:57: error: ISO C++ forbids declaration of ?PyObject?
with no type
_jcc/java/lang/Object.h:57: error: expected ?;? before ?*? token
In file included from _jcc/java/lang/Class.h:28,
from jcc/sources/jcc.cpp:33:
jcc/sources/JArray.h:46: error: expected `)' before ?*? token
jcc/sources/JArray.h:50: error: ?PyObject? has not been declared
jcc/sources/JArray.h:54: error: ISO C++ forbids declaration of ?PyObject?
with no type
jcc/sources/JArray.h:54: error: expected ?;? before ?*? token
jcc/sources/JArray.h:68: error: expected `;' before ?T?
jcc/sources/JArray.h:108: error: expected `)' before ?*? token
jcc/sources/jcc.cpp:599: error: expected `}' at end of input
jcc/sources/JArray.h:105: error: expected unqualified-id at end o

Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Mon, 10 Aug 2009, KK wrote:


Thank you Andi.
I'm going through the link you mentioned.
One question: i already have open-jdk, do i still need to install
sun-java5-jdk ?


No, open-jdk 6 or 7 should work just fine.

Andi..


or open-jdk will do the job as well? if yes do i need to make some
changes/tweaks before following those steps?

Thanks,
KK

On Mon, Aug 10, 2009 at 2:50 PM, Andi Vajda  wrote:



On Aug 10, 2009, at 10:54, KK  wrote:

 hi all,

Can someone please help me fixing the issue. before that these are the
vesion of tools i'm using,
 pylucene version: PyLucene-2.2.0-1
 python: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
 gcc: gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

I've been trying to install pylucene on linux for last couple of days, and
i must say its a horrible exp...after googling a lot i'm kinda lost...no
specific information is available to fix the issue. I followed the basic
installation instruction, which in esssence boils down to copying some
files
from the python subdirectory of pylucene to the site-specific sub
directory
under /usr/loca/lib/python2.6...but after copying the contents of gcj/ and
doing a ldconfig gives error even for apt-get like this
kk-laptop$ sudo apt-get update
[sudo] password for kk:
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
(required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
(required by /usr/lib/libapt-pkg-libc6.9-6.so.4.7)
then i tried removing the those two .so files copied to the /usr/local/lib
directory as mentioned in the README and after running sudo ldconfig,
apt-get issue was got resolved,

i also refered to this ubuntu thread for installation but of no help,
 http://ubuntuforums.org/showthread.php?t=593327

starting python and then trying to import the module gives this error:
kk-laptop$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.


 import PyLucene



Traceback (most recent call last):

File "", line 1, in 
ImportError: No module named PyLucene






and the output of sys.path is this:


 import sys

print sys.path


['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',

'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10',
'/var/lib/python-support/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/var/lib/python-support/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages']






can someone please help me fixing this issue. i'm completely lost/stuck at
this issue. seems like i'm an idiot, not able to install pylucne (which is
essentially copying some files)
thank you very much.



PyLucene with gcj was discontinued last year. Use PyLucene with jcc
instead.
 http://lucene.apache.org/pylucene
has installation instructions and docs.

Andi..




--kk







Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
Hi,
As I mentioned earlier jcc got installed to dist-packages sub-directory of
python2.6, instead of site-packages,  and modifying the Makefile to reflect
that was not working porperly, so i simply created a sym link in
/usr/lib/python2.6 wiht a name "site-packages" and made it point to the
actual jcc installation (rather, faulty in my case) i.e
/usr/local/lib/python2.6/dist-packages. Then I used the normal process of
installation, make and make install without any errors. Importing lucene is
not giving any errors( so far) and i guess we've to load JVM before doing
anything else, right? using the lucene.initVM(lucene.CLASSPATH) statement.
And yes I've to add the ld path to my .bashrc file this ways, i guess this
is okey ( its working fine, without this it was giving errors saying
libjava.so not found), this is what i did:
  export
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/i386/:/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:$LD_LIBRARY_PATH

Finally I'm done installing PyLucene on my box after fighting for 3-4 days.
Sounds stupid?Yes, but true in my case.

Thank you very much @ Christian & Andi

--KK


On Mon, Aug 10, 2009 at 4:37 PM, KK  wrote:

> Yes, jcc is under dist-packages.
> I think I should comment the lines I commented out for linux as we're
> going to  provide all those details from the command line, right?
> I did the same and ruinning the commad you mentioned gave me the following
> errors:
>
> k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$ make ANT=ant
> PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m jcc.__main__"
> NUM_FILES=2
> CFLAGS= /usr/bin/python2.6 -m jcc.__main__ --jar
> lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
> lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
> --jar
> lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
> --jar
> lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
> --jar
> lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
> --jar
> lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
> --jar build/jar/extensions.jar --package java.lang java.lang.System
> java.lang.Runtime java.lang.Boolean java.lang.Byte java.lang.Character
> java.lang.Integer java.lang.Short java.lang.Long java.lang.Double
> java.lang.Float --package java.util java.text.SimpleDateFormat --package
> java.io java.io.StringReader java.io.InputStreamReader
> java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
> --exclude org.apache.lucene.queryParser.TokenMgrError --exclude
> org.apache.lucene.queryParser.ParseException --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
> org.apache.lucene.search.Hits 'length:()I'
> 'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.2.0-578217
> --files 2 --build
> /usr/bin/python2.6: libjava.so: cannot open shared object file: No such
> file or directory
> make: *** [compile] Error 1
> k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$
>
> Any idea on how to resolve this error?
>
> Thanks,
> KK.
>
>
> On Mon, Aug 10, 2009 at 4:25 PM, Christian Heimes wrote:
>
>> KK schrieb:
>>
>>> Thanks Christian.
>>> After installing python-dev i'm able to do the build for jcc and then
>>> installed without gettig any error messages. Then from the main directory
>>> i
>>> changed the makefile and (surprisingly i dint see any site-packages
>>> directory under python2.6, but i still modified the path for __init__.py
>>> then running  "make"  downloaded lucene stuffs, I guess, and then gave me
>>> some error messages like this:
>>> 
>>>
>>
>> [...]
>>
>>  This cleary says that there is no __init__.py file, in fact as I
>>> mentioned
>>> earlier i couldn't find any site-packages directory under python2.6. Am I
>>> doing something wrong? Whats the way out?
>>>
>>> As a side note, I'm using open-jdk and not sun-jdk.
>>>
>>
>> Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you
>> shouldn't use an absolute path to call JCC. I suggest you use the python2.6
>> as interpreter and "-m jcc.__main__" as JCC argument:
>>
>> make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m
>> jcc.__main__" NUM_FILES=2
>>
>> Christian
>>
>
>


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
Yes, jcc is under dist-packages.
I think I should comment the lines I commented out for linux as we're
going to  provide all those details from the command line, right?
I did the same and ruinning the commad you mentioned gave me the following
errors:

k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$ make ANT=ant
PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m jcc.__main__"
NUM_FILES=2
CFLAGS= /usr/bin/python2.6 -m jcc.__main__ --jar
lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
--jar build/jar/extensions.jar --package java.lang java.lang.System
java.lang.Runtime java.lang.Boolean java.lang.Byte java.lang.Character
java.lang.Integer java.lang.Short java.lang.Long java.lang.Double
java.lang.Float --package java.util java.text.SimpleDateFormat --package
java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --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
org.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.2.0-578217
--files 2 --build
/usr/bin/python2.6: libjava.so: cannot open shared object file: No such file
or directory
make: *** [compile] Error 1
k...@kk-laptop:~/softies/socs/PyLucene-2.2.0-1$

Any idea on how to resolve this error?

Thanks,
KK.

On Mon, Aug 10, 2009 at 4:25 PM, Christian Heimes  wrote:

> KK schrieb:
>
>> Thanks Christian.
>> After installing python-dev i'm able to do the build for jcc and then
>> installed without gettig any error messages. Then from the main directory
>> i
>> changed the makefile and (surprisingly i dint see any site-packages
>> directory under python2.6, but i still modified the path for __init__.py
>> then running  "make"  downloaded lucene stuffs, I guess, and then gave me
>> some error messages like this:
>> 
>>
>
> [...]
>
>  This cleary says that there is no __init__.py file, in fact as I mentioned
>> earlier i couldn't find any site-packages directory under python2.6. Am I
>> doing something wrong? Whats the way out?
>>
>> As a side note, I'm using open-jdk and not sun-jdk.
>>
>
> Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you
> shouldn't use an absolute path to call JCC. I suggest you use the python2.6
> as interpreter and "-m jcc.__main__" as JCC argument:
>
> make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m
> jcc.__main__" NUM_FILES=2
>
> Christian
>


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Christian Heimes

KK schrieb:

Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:



[...]


This cleary says that there is no __init__.py file, in fact as I mentioned
earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.


Where did JCC ended up? Perhaps it's in /usr/local/lib. Anyway you 
shouldn't use an absolute path to call JCC. I suggest you use the 
python2.6 as interpreter and "-m jcc.__main__" as JCC argument:


make ANT=ant PYTHON=/usr/bin/python2.6 JCC="/usr/bin/python2.6 -m 
jcc.__main__" NUM_FILES=2


Christian


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
Thanks Christian.
After installing python-dev i'm able to do the build for jcc and then
installed without gettig any error messages. Then from the main directory i
changed the makefile and (surprisingly i dint see any site-packages
directory under python2.6, but i still modified the path for __init__.py
then running  "make"  downloaded lucene stuffs, I guess, and then gave me
some error messages like this:


BUILD SUCCESSFUL
Total time: 2 seconds
ant -Dlucene.dir=lucene-java-2.2.0-578217
Buildfile: build.xml

compile:
[mkdir] Created dir:
/home/kk/softies/socs/PyLucene-2.2.0-1/build/classes
[javac] Compiling 22 source files to
/home/kk/softies/socs/PyLucene-2.2.0-1/build/classes
[javac] Note:
/home/kk/softies/socs/PyLucene-2.2.0-1/java/org/osafoundation/lucene/store/PythonDirectory.java
uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.

jar:
[mkdir] Created dir: /home/kk/softies/socs/PyLucene-2.2.0-1/build/jar
  [jar] Building jar:
/home/kk/softies/socs/PyLucene-2.2.0-1/build/jar/extensions.jar

BUILD SUCCESSFUL
Total time: 1 second
CFLAGS= /usr/bin/python /usr/lib/python2.6/site-packages/jcc/__init__.py
--jar lucene-java-2.2.0-578217/build/lucene-core-2.2.0-578217.jar --jar
lucene-java-2.2.0-578217/build/contrib/snowball/lucene-snowball-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/highlighter/lucene-highlighter-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/analyzers/lucene-analyzers-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/regex/lucene-regex-2.2.0-578217.jar
--jar
lucene-java-2.2.0-578217/build/contrib/queries/lucene-queries-2.2.0-578217.jar
--jar build/jar/extensions.jar --package java.lang java.lang.System
java.lang.Runtime java.lang.Boolean java.lang.Byte java.lang.Character
java.lang.Integer java.lang.Short java.lang.Long java.lang.Double
java.lang.Float --package java.util java.text.SimpleDateFormat --package
java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.ParseException --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
org.apache.lucene.search.Hits 'length:()I'
'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.2.0-578217
--files 1 --build
/usr/bin/python: can't open file
'/usr/lib/python2.6/site-packages/jcc/__init__.py': [Errno 2] No such file
or directory
make: *** [compile] Error 2

This cleary says that there is no __init__.py file, in fact as I mentioned
earlier i couldn't find any site-packages directory under python2.6. Am I
doing something wrong? Whats the way out?

As a side note, I'm using open-jdk and not sun-jdk.

Thanks,
KK

On Mon, Aug 10, 2009 at 3:40 PM, Christian Heimes  wrote:

> KK wrote:
>
>  kk-laptop:~/softies/socs/PyLucene-2.2.0-1/jcc$ python setup.py build
>> running build
>> running build_py
>> creating build
>> creating build/lib.linux-i686-2.6
>> creating build/lib.linux-i686-2.6/jcc
>> copying jcc/cpp.py -> build/lib.linux-i686-2.6/jcc
>> copying jcc/config.py -> build/lib.linux-i686-2.6/jcc
>> copying jcc/python.py -> build/lib.linux-i686-2.6/jcc
>> copying jcc/__init__.py -> build/lib.linux-i686-2.6/jcc
>> creating build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/jcc.cpp -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/JCCEnv.cpp -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/functions.cpp -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/JObject.cpp -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/functions.h -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/macros.h -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/JObject.h -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/JArray.h -> build/lib.linux-i686-2.6/jcc/sources
>> copying jcc/sources/JCCEnv.h -> build/lib.linux-i686-2.6/jcc/sources
>> running build_ext
>> building 'jcc._jcc' extension
>> creating build/temp.linux-i686-2.6
>> creating build/temp.linux-i686-2.6/jcc
>> creating build/temp.linux-i686-2.6/jcc/sources
>> creating build/temp.linux-i686-2.6/_jcc
>> creating build/temp.linux-i686-2.6/_jcc/java
>> creating build/temp.linux-i686-2.6/_jcc/java/util
>> creating build/temp.linux-i686-2.6/_jcc/java/lang
>> creating build/temp.linux-i686-2.6/_jcc/java/lang/reflect
>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>> -Wstrict-prototypes -fPIC -I/usr/lib/jvm/java-6-openjdk/include/
>> -I/usr/lib/jvm/java-6-openjdk/include/linux -I_jcc -Ijcc/sources
>> -I/usr/include/python2.6 -c jcc/sources/jcc.cpp -o
>> build/temp.linux-i686-2.6/jcc/sources/jcc.o -DPYTHON
>> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
>> Ada/

Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Christian Heimes

KK wrote:


kk-laptop:~/softies/socs/PyLucene-2.2.0-1/jcc$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/jcc
copying jcc/cpp.py -> build/lib.linux-i686-2.6/jcc
copying jcc/config.py -> build/lib.linux-i686-2.6/jcc
copying jcc/python.py -> build/lib.linux-i686-2.6/jcc
copying jcc/__init__.py -> build/lib.linux-i686-2.6/jcc
creating build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/jcc.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/macros.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JArray.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.h -> build/lib.linux-i686-2.6/jcc/sources
running build_ext
building 'jcc._jcc' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/jcc
creating build/temp.linux-i686-2.6/jcc/sources
creating build/temp.linux-i686-2.6/_jcc
creating build/temp.linux-i686-2.6/_jcc/java
creating build/temp.linux-i686-2.6/_jcc/java/util
creating build/temp.linux-i686-2.6/_jcc/java/lang
creating build/temp.linux-i686-2.6/_jcc/java/lang/reflect
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/lib/jvm/java-6-openjdk/include/
-I/usr/lib/jvm/java-6-openjdk/include/linux -I_jcc -Ijcc/sources
-I/usr/include/python2.6 -c jcc/sources/jcc.cpp -o
build/temp.linux-i686-2.6/jcc/sources/jcc.o -DPYTHON
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
jcc/sources/jcc.cpp:29:20: error: Python.h: No such file or directory


sudo apt-get install python-dev

Christian


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
For "open-jdk" my setup.py file is like this:

import os, sys
from distutils.core import setup, Extension

# Add or edit the entry corresponding to your system in the INCLUDES and
# LFLAGS dictionaries below. These entries are used to build JCC _and_ are
# used by JCC to drive compiling and linking via distutils the extensions it
# generated code for.
# The key for your system is determined by sys.platform.

INCLUDES = {
'darwin':
['/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers'],
'linux2': ['/usr/lib/jvm/java-6-openjdk/include/',
   '/usr/lib/jvm/java-6-openjdk/include/linux'],
'win32': ['o:/Java/jdk1.6.0_02/include',
  'o:/Java/jdk1.6.0_02/include/win32'],
}

LFLAGS = {
'darwin': ['-framework', 'JavaVM'],
'linux2': ['-L/usr/lib/jvm/java-6-openjdk/jre/lib/i386/', '-ljava'],
'win32': ['/LIBPATH:o:/Java/jdk1.6.0_02/lib', 'jvm.lib']
}

and running the build gave me the following error,

kk-laptop:~/softies/socs/PyLucene-2.2.0-1/jcc$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/jcc
copying jcc/cpp.py -> build/lib.linux-i686-2.6/jcc
copying jcc/config.py -> build/lib.linux-i686-2.6/jcc
copying jcc/python.py -> build/lib.linux-i686-2.6/jcc
copying jcc/__init__.py -> build/lib.linux-i686-2.6/jcc
creating build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/jcc.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.cpp -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/functions.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/macros.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JObject.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JArray.h -> build/lib.linux-i686-2.6/jcc/sources
copying jcc/sources/JCCEnv.h -> build/lib.linux-i686-2.6/jcc/sources
running build_ext
building 'jcc._jcc' extension
creating build/temp.linux-i686-2.6
creating build/temp.linux-i686-2.6/jcc
creating build/temp.linux-i686-2.6/jcc/sources
creating build/temp.linux-i686-2.6/_jcc
creating build/temp.linux-i686-2.6/_jcc/java
creating build/temp.linux-i686-2.6/_jcc/java/util
creating build/temp.linux-i686-2.6/_jcc/java/lang
creating build/temp.linux-i686-2.6/_jcc/java/lang/reflect
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/lib/jvm/java-6-openjdk/include/
-I/usr/lib/jvm/java-6-openjdk/include/linux -I_jcc -Ijcc/sources
-I/usr/include/python2.6 -c jcc/sources/jcc.cpp -o
build/temp.linux-i686-2.6/jcc/sources/jcc.o -DPYTHON
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
jcc/sources/jcc.cpp:29:20: error: Python.h: No such file or directory
jcc/sources/jcc.cpp:30:26: error: structmember.h: No such file or directory
In file included from jcc/sources/jcc.cpp:32:
jcc/sources/JCCEnv.h:215: error: ‘PyObject’ has not been declared
jcc/sources/JCCEnv.h:216: error: ISO C++ forbids declaration of ‘PyObject’
with no type
jcc/sources/JCCEnv.h:216: error: ‘PyObject’ declared as a ‘virtual’ field
jcc/sources/JCCEnv.h:216: error: expected ‘;’ before ‘*’ token
jcc/sources/JCCEnv.h:217: error: ‘PyObject’ has not been declared
In file included from _jcc/java/lang/Object.h:28,
 from jcc/sources/JArray.h:32,
 from _jcc/java/lang/Class.h:28,
 from jcc/sources/jcc.cpp:33:
jcc/sources/JObject.h:78: error: ‘PyObject_HEAD’ does not name a type
jcc/sources/JObject.h:82: error: ‘PyTypeObject’ does not name a type
In file included from jcc/sources/JArray.h:32,
 from _jcc/java/lang/Class.h:28,
 from jcc/sources/jcc.cpp:33:
_jcc/java/lang/Object.h:51: error: ‘PyTypeObject’ does not name a type
_jcc/java/lang/Object.h:55: error: ‘PyObject_HEAD’ does not name a type
_jcc/java/lang/Object.h:57: error: ISO C++ forbids declaration of ‘PyObject’
with no type
_jcc/java/lang/Object.h:57: error: expected ‘;’ before ‘*’ token
In file included from _jcc/java/lang/Class.h:28,
 from jcc/sources/jcc.cpp:33:
jcc/sources/JArray.h:46: error: expected `)' before ‘*’ token
jcc/sources/JArray.h:50: error: ‘PyObject’ has not been declared
jcc/sources/JArray.h:54: error: ISO C++ forbids declaration of ‘PyObject’
with no type
jcc/sources/JArray.h:54: error: expected ‘;’ before ‘*’ token
jcc/sources/JArray.h:68: error: expected `;' before ‘T’
jcc/sources/JArray.h:108: error: expected `)' before ‘*’ token
jcc/sources/jcc.cpp:599: error: expected `}' at end of input
jcc/sources/JArray.h:105: error: expected unqualified-id at end of input
error: command 'gcc' failed with exit status 1

does this imply i should better install sun-jdk and redo the steps?

Thanks,
KK.

On Mon, Aug 10, 2009 at 3:04 PM, KK  wrote:

> Thank you Andi.
> I

Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
Thank you Andi.
I'm going through the link you mentioned.
One question: i already have open-jdk, do i still need to install
sun-java5-jdk ?
or open-jdk will do the job as well? if yes do i need to make some
changes/tweaks before following those steps?

Thanks,
KK

On Mon, Aug 10, 2009 at 2:50 PM, Andi Vajda  wrote:

>
> On Aug 10, 2009, at 10:54, KK  wrote:
>
>  hi all,
>> Can someone please help me fixing the issue. before that these are the
>> vesion of tools i'm using,
>>  pylucene version: PyLucene-2.2.0-1
>>  python: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
>>  gcc: gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
>>
>> I've been trying to install pylucene on linux for last couple of days, and
>> i must say its a horrible exp...after googling a lot i'm kinda lost...no
>> specific information is available to fix the issue. I followed the basic
>> installation instruction, which in esssence boils down to copying some
>> files
>> from the python subdirectory of pylucene to the site-specific sub
>> directory
>> under /usr/loca/lib/python2.6...but after copying the contents of gcj/ and
>> doing a ldconfig gives error even for apt-get like this
>> kk-laptop$ sudo apt-get update
>> [sudo] password for kk:
>> apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
>> (required by apt-get)
>> apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
>> (required by /usr/lib/libapt-pkg-libc6.9-6.so.4.7)
>> then i tried removing the those two .so files copied to the /usr/local/lib
>> directory as mentioned in the README and after running sudo ldconfig,
>> apt-get issue was got resolved,
>>
>> i also refered to this ubuntu thread for installation but of no help,
>>  http://ubuntuforums.org/showthread.php?t=593327
>>
>> starting python and then trying to import the module gives this error:
>> kk-laptop$ python
>> Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
>> [GCC 4.3.3] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>>>  import PyLucene
>
 Traceback (most recent call last):
>> File "", line 1, in 
>> ImportError: No module named PyLucene
>>
>>>
>
>> and the output of sys.path is this:
>>
>>>  import sys
> print sys.path
>
 ['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
>> '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
>> '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
>> '/usr/lib/python2.6/dist-packages/PIL',
>> '/usr/lib/python2.6/dist-packages/gst-0.10',
>> '/var/lib/python-support/python2.6',
>> '/usr/lib/python2.6/dist-packages/gtk-2.0',
>> '/var/lib/python-support/python2.6/gtk-2.0',
>> '/usr/local/lib/python2.6/dist-packages']
>>
>>>
>
>> can someone please help me fixing this issue. i'm completely lost/stuck at
>> this issue. seems like i'm an idiot, not able to install pylucne (which is
>> essentially copying some files)
>> thank you very much.
>>
>
> PyLucene with gcj was discontinued last year. Use PyLucene with jcc
> instead.
>  http://lucene.apache.org/pylucene
> has installation instructions and docs.
>
> Andi..
>
>
>>
>> --kk
>>
>


Re: Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread Andi Vajda


On Aug 10, 2009, at 10:54, KK  wrote:


hi all,
Can someone please help me fixing the issue. before that these are the
vesion of tools i'm using,
  pylucene version: PyLucene-2.2.0-1
  python: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
  gcc: gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

I've been trying to install pylucene on linux for last couple of  
days, and
i must say its a horrible exp...after googling a lot i'm kinda  
lost...no
specific information is available to fix the issue. I followed the  
basic
installation instruction, which in esssence boils down to copying  
some files
from the python subdirectory of pylucene to the site-specific sub  
directory
under /usr/loca/lib/python2.6...but after copying the contents of  
gcj/ and

doing a ldconfig gives error even for apt-get like this
kk-laptop$ sudo apt-get update
[sudo] password for kk:
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not  
found

(required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not  
found

(required by /usr/lib/libapt-pkg-libc6.9-6.so.4.7)
then i tried removing the those two .so files copied to the /usr/ 
local/lib

directory as mentioned in the README and after running sudo ldconfig,
apt-get issue was got resolved,

i also refered to this ubuntu thread for installation but of no help,
 http://ubuntuforums.org/showthread.php?t=593327

starting python and then trying to import the module gives this error:
kk-laptop$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import PyLucene

Traceback (most recent call last):
File "", line 1, in 
ImportError: No module named PyLucene




and the output of sys.path is this:

import sys
print sys.path

['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10',
'/var/lib/python-support/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/var/lib/python-support/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages']




can someone please help me fixing this issue. i'm completely lost/ 
stuck at
this issue. seems like i'm an idiot, not able to install pylucne  
(which is

essentially copying some files)
thank you very much.


PyLucene with gcj was discontinued last year. Use PyLucene with jcc  
instead.

 http://lucene.apache.org/pylucene
has installation instructions and docs.

Andi..




--kk


Pylucene installation issue on Ubuntu LInux

2009-08-10 Thread KK
hi all,
Can someone please help me fixing the issue. before that these are the
vesion of tools i'm using,
   pylucene version: PyLucene-2.2.0-1
   python: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
   gcc: gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

 I've been trying to install pylucene on linux for last couple of days, and
i must say its a horrible exp...after googling a lot i'm kinda lost...no
specific information is available to fix the issue. I followed the basic
installation instruction, which in esssence boils down to copying some files
from the python subdirectory of pylucene to the site-specific sub directory
under /usr/loca/lib/python2.6...but after copying the contents of gcj/ and
doing a ldconfig gives error even for apt-get like this
kk-laptop$ sudo apt-get update
[sudo] password for kk:
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
(required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
(required by /usr/lib/libapt-pkg-libc6.9-6.so.4.7)
then i tried removing the those two .so files copied to the /usr/local/lib
directory as mentioned in the README and after running sudo ldconfig,
apt-get issue was got resolved,

i also refered to this ubuntu thread for installation but of no help,
  http://ubuntuforums.org/showthread.php?t=593327

starting python and then trying to import the module gives this error:
kk-laptop$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyLucene
Traceback (most recent call last):
File "", line 1, in 
ImportError: No module named PyLucene
>>>

and the output of sys.path is this:
>>> import sys
>>> print sys.path
['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10',
'/var/lib/python-support/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/var/lib/python-support/python2.6/gtk-2.0',
'/usr/local/lib/python2.6/dist-packages']
>>>

can someone please help me fixing this issue. i'm completely lost/stuck at
this issue. seems like i'm an idiot, not able to install pylucne (which is
essentially copying some files)
thank you very much.

--kk