Problem with Python 2.6 + JCC + Pylucene

Hello,

I am trying to use pylucene in Python 2.6. Since there are no windows for 2.6, I am trying to create the source code.

First of all, I create 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

Please note that it will not copy anything in my directory "F: \ Python26 \ Lib \ site-packages". I do not know why. Thus, I do not know if it is really installed or not.

Now I will make a pill

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 looks like JCC has not been installed at all.

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

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?

+5
source share
3 answers

to try:

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

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

, python cygwin jcc python ...

+1

  • error: None , , , build

  • cygwin, , python cygwin, Windows, ​​ F:\Python - /cygdrive/f/Python26//python.exe,

  • mingw32, mingw32 python setup.py build -c mingw32 python setup.py install

+1

which just can build jcc and install

top full code.

13998bytes

upon 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)
>>>
0
source

All Articles