Reputation: 111
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?
Upvotes: 5
Views: 4081
Reputation: 31
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)
>>>
Upvotes: 0
Reputation: 123831
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
Upvotes: 1
Reputation: 1626
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...
Upvotes: 1