castorini / pyserini

Pyserini is a Python toolkit for reproducible information retrieval research with sparse and dense representations.
http://pyserini.io/
Apache License 2.0
1.67k stars 370 forks source link

No matching jar found #1775

Closed AlexStan0 closed 9 months ago

AlexStan0 commented 9 months ago

I was working through the onboarding path for Waterloo students and when I was working on the Indexing step for Pyserini I was hit with this error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/alexa/pyserini/pyserini/search/__init__.py", line 17, in <module>
    from ._base import JQuery, JQueryGenerator, JDisjunctionMaxQueryGenerator, get_topics,\
  File "/home/alexa/pyserini/pyserini/search/_base.py", line 26, in <module>
    from pyserini.pyclass import autoclass
  File "/home/alexa/pyserini/pyserini/pyclass.py", line 24, in <module>
    configure_classpath(os.environ['ANSERINI_CLASSPATH'] if 'ANSERINI_CLASSPATH' in os.environ else
  File "/home/alexa/pyserini/pyserini/setup.py", line 37, in configure_classpath
    raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))
Exception: No matching jar file found in /home/alexa/pyserini/pyserini/resources/jars

I checked the resources folder and did in fact not find anything.

I am using:

Python 3.10.2 OpenJDK 11.0.22 Maven 3.6.3 (downgraded as I moved to Ubuntu due to Arch not working well with the installs required for pyserini)

All of this is running in a WSL2 container on a Windows 11 PC with a Ryzen 5 5600x and 32GB

lintool commented 9 months ago

Did you follow the instructions to build a fatjar from Anserini and copy over to Pyserini?

AlexStan0 commented 9 months ago

Oh, it seems I forgot to copy over the fatjar from Anserini to Pyserini, my apologies.

huguangcheng commented 2 months ago

哦,看来我忘了将 fatjar 从 Anserini 复制到 Pyserini,抱歉。 你好 请问您怎么弄的?