On Mon, 22 Nov 2010, Bill Janssen wrote:
Bill Janssen <[email protected]> wrote:
Using depends.exe on _jcc.pyd says that the missing file is
Python27.dll, which seems odd. Where should I find that?
And there is a python27.dll in C:\Windows\system32\.
So, not sure what the problem is.
I just tried this myself and it seems that with Python 2.7 __name__ is never
equal to '__main__' in jcc's __init__.py. So, jcc.__main__ is never imported
implicitely from __init__.py and hence --find-jvm-dll is ineffective.
I moved the --find-jvm-dll trickery to __init__.py and that seems to solve
the problem. Of course, this is all masked if the PATH already contains the
JRE directories.
Andi..
Bill
Bill
roman
On Mon, Nov 22, 2010 at 7:53 PM, Bill Janssen <[email protected]> wrote:
I got a brand-new Windows 7 machine, and thought I'd try building
PyLucene with a newer version of Python, 2.7, the 32-bit version.
I also had to move to setuptools-0.6c11, because 0.6c9 doesn't seem to
work with Python 2.7. Using 32-bit Java 6.0_22.
But I can't get JCC to run here:
sh-3.1$ which jcc.dll
/c/Python27/Lib/site-packages/JCC-2.6-py2.7-win32.egg/jcc.dll
sh-3.1$ which jvm.dll
/c/Program Files (x86)/Java/jre6/bin/client/jvm.dll
sh-3.1$ python -m jcc.__main__ --help
c:\Python27\python.exe: DLL load failed: The specified module could not be
found.
sh-3.1$
sh-3.1$ python -c 'import os; print os.environ.get("PATH")'
c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;C:\MinGW\msys\1.0\bin;C:\MinGW\bin;c:\Python27;c:\Program
Files\apache-ant-1.8.1\bin;c:\Program Files
(x86)\Java\jre6\bin\client;c:\Python27\Lib\site-packages\JCC-2.6-py2.7-win32.egg
It seems to build and install OK, but when I run python in verbose mode,
I see
import jcc # directory c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc
# c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc
matches c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.py
import jcc # precompiled from
c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\__init__.pyc
# c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc matches
c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.py
import jcc.config # precompiled from
c:\Python27\lib\site-packages\jcc-2.6-py2.7-win32.egg\jcc\config.pyc
c:\Python27\python.exe: DLL load failed: The specified module could not be
found.
So, what's in jcc/config.py? Here's what's in it:
INCLUDES=['C:\\Program Files (x86)\\Java\\jdk1.6.0_22\\include', 'C:\\Program
Files (x86)\\Java\\jdk1.6.0_22\\include\\win32']
CFLAGS=['-fno-strict-aliasing', '-Wno-write-strings']
DEBUG_CFLAGS=['-O0', '-g', '-DDEBUG']
LFLAGS=['-LC:\\Program Files (x86)\\Java\\jdk1.6.0_22\\lib', '-ljvm']
IMPLIB_LFLAGS=['-Wl,--out-implib,%s']
SHARED=True
VERSION="2.6"
Any ideas about what's going wrong? I suspect those parentheses in the
path to the jvm, myself.
Bill