question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install in development mode

See original GitHub issue

Hi,

I am new to Pyserini. I followed steps in https://github.com/castorini/pyserini#development-installation to try to install this package in development mode (to try out DPR retrieval model), but I got java.lang.NoClassDefFoundError error when running unit test:

======================================================================
ERROR: tests.test_querybuilder (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_querybuilder
Traceback (most recent call last):
  File "/home/jupyter/miniconda3/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/jupyter/miniconda3/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/mnt/c/Users/jupyter/openqa/pyserini/tests/test_querybuilder.py", line 25, in <module>
    from pyserini.analysis import get_lucene_analyzer
  File "/mnt/c/Users/jupyter/openqa/pyserini/pyserini/analysis/__init__.py", line 17, in <module>
    from ._base import get_lucene_analyzer, Analyzer, JAnalyzer, JAnalyzerUtils, JDefaultEnglishAnalyzer, JWhiteSpaceAnalyzer
  File "/mnt/c/Users/jupyter/openqa/pyserini/pyserini/analysis/_base.py", line 37, in <module>
    JFreebaseAnalyzer = autoclass('io.anserini.analysis.FreebaseAnalyzer')
  File "/home/jupyter/miniconda3/lib/python3.8/site-packages/jnius/reflect.py", line 229, in autoclass
    c = find_javaclass(clsname)
  File "jnius/jnius_export_func.pxi", line 26, in jnius.find_javaclass
  File "jnius/jnius_jvm_dlopen.pxi", line 91, in jnius.create_jnienv
jnius.JavaException: JVM exception occurred: io/anserini/analysis/FreebaseAnalyzer java.lang.NoClassDefFoundError

May I how I can solve this? Thank you

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MXueguangcommented, May 2, 2021

I see. I’ll fix it soon.

0reactions
hnt4499commented, May 2, 2021

Thank you, it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Developer Mode package failed to install. Error ...
Method 1: Manually install Developer Mode ... Click on Add a feature, and select the Windows Developer Mode package. Install it, and reboot ......
Read more >
Developer Mode package failed to install - MSDN - Microsoft
Open the Settings app. · Click on “Apps & features” · Choose “Manage Optional features” · Press the button “Add a feature” ·...
Read more >
Fix Developer Mode Package Failed to install Error 0x80004005
Manually install Developer Mode · Open the Settings app. · Click Apps, then click on “Apps & features” · Choose “Manage Optional features”...
Read more >
Windows 10: Developer Mode package failed to install. Error ...
Open the Settings app. · Select “System” · Select “Apps & features” · Choose “Manage Optional features” · Press the button “Add a...
Read more >
Unable to use locally built python package in development ...
I've then tried install the package as follows: sudo pip3 install -e . Installing build dependencies ... done Getting requirements to build ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found