Python 2.6 + JCC + Pylucene issue

Greetings,

I'm trying to use pylucene in Python 2.6. Since there's no windows build for 2.6, I try to build the source code.

First of all, I build JCC (windows, using cygwin)

python setup.py build
running build
running build_py
[...]
building 'jcc' extension
error: None

python setup.py install
running install
[...]
copying jcc\config.py -> build\lib.win32-2.6\jcc
copying jcc\classes\org\osafoundation\jcc\PythonException.class -> build\lib.win32-2.6\jcc\classes\org\osafoundation\jcc
running build_ext
building 'jcc' extension
error: None

Notice that it won't copy anything on my "F:\Python26\Lib\site-packages" directory. I don't know why. So that, I don't know if it's really installed or not.

Now, I'll make pylucene

make
/cygdrive/f/Python26//python.exe -m jcc --shared --jar lucene-java-2.4.0/build/lucene-core-2.4.0.jar 
[...]
'doc:(I)Lorg/apache/lucene/document/Document;' --version 2.4.0 --files 2 --build

f:\Python26\python.exe: No module named jcc
make: *** [compile] Error 1

So, it seems JCC wasn't installed at all.

Then, I try to copy the "jcc build" under F:\Python26\Lib\site-packages, and I try to make pylucene again:

make
[...]
f:\Python26\python.exe: jcc is a package and cannot be directly executed
make: *** [compile] Error 1

Has anyone else seen this and found a workaround?


Asked by: Sienna954 | Posted: 24-09-2021






Answer 1

try:

/cygdrive/f/Python26//python.exe setup.py build

and

/cygdrive/f/Python26//python.exe setup.py build setup.py install

I believe you are using python from cygwin for instaling jcc and python from windows for running...

Answered by: Alford177 | Posted: 25-10-2021



Answer 2

Few checkpoints

  • error: None mean there is an error on building, it was NOT success, so the extensions does not get build

  • if you are using cygwin, I guess you need to use cygwin version of python, but according to this you using windows version, which is installed in F:\Python - /cygdrive/f/Python26//python.exe,

  • I suggest you to try with mingw32, install mingw32 and try python setup.py build -c mingw32 and python setup.py install

Answered by: Fenton659 | Posted: 25-10-2021



Answer 3

that just can build jcc and install,

top full code.

13998bytes

when import,report error.

>>> import jcc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python26\lib\site-packages\jcc-2.5.1-py2.6-win32.egg\jcc\__init__.py"
, line 29, in <module>
    from _jcc import initVM
ImportError: DLL load failed: 找不到指定的模块。(cant find appointed modules)
>>>

Answered by: Lana698 | Posted: 25-10-2021



Similar questions

pylucene with python 3

I have a virtual environment with python 3.4.3. I want to install pylucene for this environment. How can I do that? Or can I somehow still run pylucene if I use the python from my virtual environment? I couldn't find any info on python 3 support on http://lucene.apache.org/pylucene/install.html and if I follow the instructions, I'...


Pylucene in Python 2.6 + MacOs Snow Leopard

Greetings, I'm trying to install Pylucene on my 32-bit python running on Snow Leopard. I compiled JCC with success. But I get warnings while making pylucene: ld: warning: in build/temp.macosx-10.6-i386-2.6/build/_lucene/__init__.o, file is not of required architecture ld: warning: in build/temp.macosx-10.6-i386-2.6/build/_lucene/__wrap01__.o, file is not of required architecture ld: warning: in build/temp.m...


java - Pylucene eclipse plugin

Is there a Pylucene eclipse plugin? or am I missing something? I want it for Auto complete. Is the import structure same as java lucene


python - pylucene install makefile error

When I build the pylucene environment, I meet this problem. I don't know how to config the makefile of it on Windows platform. Someone help me, if there is any example about building pylucene on Windows. The cmd shows that: can not find tools.jar makefile213:recipe for target 'ivy' failed. make:***【ivy】error 1 Here is the makefile: VERSION=3.6.1-2...


java - PyLucene error with IceTea / JDK / JRE

I have followed the installation instructionrs http://bendemott.blogspot.de/2013/11/installing-pylucene-4-451.html for pylucene using the latest pylucene-4.9.0.0. And when i tried to to lucene.initVM(), I get the following error: alvas@ubi:~$ python Python 2.7.6 (default, Mar 22 2014, 22:59:56...


pylucene with python 3

I have a virtual environment with python 3.4.3. I want to install pylucene for this environment. How can I do that? Or can I somehow still run pylucene if I use the python from my virtual environment? I couldn't find any info on python 3 support on http://lucene.apache.org/pylucene/install.html and if I follow the instructions, I'...


python - How to install PyLucene 6.0.2 in windows

I'm trying to create a simple application on the Information Retreival using python &amp; PyLucene. Can you help me to install PyLucene 6.2.0 on windows , I already installed jcc , but i didn't know how to install PyLucene. I found this documentation http://lucene.apac...


java - Trouble with Make and Make install for PyLucene

I'm trying to install PyLucene 8.1.1 on OSX 10.13.6, Python 2.7, Java 1.6. My makefile is as follows: VERSION=8.1.1 LUCENE_VER=8.1.1 PYLUCENE:=$(shell pwd) LUCENE_SRC=lucene-java-$(LUCENE_VER) LUCENE=$(LUCENE_SRC)/lucene ANT=JAVA_HOME=/usr/local/bin/ant PYTHON=/Users/ericaguo/miniconda3/bin/python JCC=$(PYTHON) -m jcc --shared NUM_FILES=10 My bash file is as follows:


python - Install Pylucene on Windows, "Make" command does not work

I was trying to setup the Pylucene on Windows10, the first few steps are successful, but after I make edits in my MAKEFILE: PREFIX_PYTHON=C:\ProgramData\Anaconda3 ANT=C:/apache-ant-1.9.14/bin/ant JAVA_HOME=C:/Progra~1/Java/jdk1.8.0_241 PYTHON=$(PREFIX_PYTHON)/python.exe #JCC=$(PYTHON) -m jcc --shared --find-jvm-dll JCC=$(PYTHON) -m jcc NUM_FILES=10 And then I execute command(Anaconda) ‘mak...


java - How to build and install pylucene on ubuntu 20.04

I am trying to install Pylucene on my WSL Ubuntu 20.04 clean installation. I tried to follow tutorial on the official page but it looks outdated. So I was wondering if anyone here managed to make it work on Ubuntu 20.04 and python 3.8.2 The commands I run: sudo apt-get upgrade sudo apt-get install -y default-jdk a...


python - PyLucene install: "make" not working and "jvm.dll could not be found"

I'm trying to get PyLucene going on my computer and have followed all of the steps but am getting stuck at the &quot;make&quot; step. I'm working on 64-bit Windows 10 Machine and my version of Python is 3.9.12. What I've done: 1.) Install Apache Ant and set environments. In this step, I also installed






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top