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

429 views Asked by At

I'm trying to get PyLucene going on my computer and have followed all of the steps but am getting stuck at the "make" 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 Java JDK 18 as per the recommendation in Apache Ant. I set all of the environment variables as instructed for JAVA_HOME, ANT_HOME, and added Ant to the path. I checked and verified that these all worked:

enter image description here

2.) Download PyLucene 9.1.0, extract the tar file, cd into the jcc folder and run python setup.py build. I changed the JAVAHOME in the setup.py file to JAVA_HOME to match the variable path name I made in the above step. I also included JCC_JDK because I got an error the first time I ran the setup.py where it asked for JCC_JDK.

enter image description here

3.) I edited the Makefile and made sure to have make installed for Windows. The top part of the make file is:

VERSION=9.1.0
LUCENE_VER=9.1.0
PYLUCENE:=$(shell pwd)
LUCENE_SRC=lucene-java-$(LUCENE_VER)
LUCENE=$(LUCENE_SRC)/lucene
PREFIX_PYTHON=C:\Users\mgsci\anaconda3 # this is where my python.exe is located
PYTHON=$(PREFIX_PYTHON)\python.exe
JCC=$(PYTHON) -m jcc --shared
NUM_FILES=16

When I ran make I got the error:

(base) C:\Users\mgsci\Downloads\PyLucene\pylucene-9.1.0>make
process_begin: CreateProcess(NULL, pwd, ...) failed.
process_begin: CreateProcess(NULL, which icupkg, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, uname, ...) failed.
(cd lucene-java-9.1.0; ./gradlew collectRuntimeJars)
process_begin: CreateProcess(NULL, uname, ...) failed.
process_begin: CreateProcess(NULL, (cd lucene-java-9.1.0; ./gradlew collectRuntimeJars), ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [lucene] Error 2

And when I just ran python -m jcc I got the error:

Traceback (most recent call last):
  File "C:\Users\mgsci\anaconda3\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\mgsci\anaconda3\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\mgsci\anaconda3\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\mgsci\anaconda3\lib\site-packages\jcc-3.12-py3.9-win-amd64.egg\jcc\__init__.py", line 26, in <module>
    add_jvm_dll_directory_to_path(find_jvm_dll)
  File "C:\Users\mgsci\anaconda3\lib\site-packages\jcc-3.12-py3.9-win-amd64.egg\jcc\windows.py", line 104, in add_jvm_dll_directory_to_path
    raise ValueError("jvm.dll could not be found")
ValueError: jvm.dll could not be found

I have the jvm.dll file. I can see it in the path jdk-18.0.2\bin\server. I also copied the jvm.dll file and placed it both in the jdk-18.0.2 folder and in the bin folder for good measure and still got this error.

What part of process did I screw up?

0

There are 0 answers