Java pacakge edu is missing for domain knowledge file

Open
#61 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, python

Research direction

Start by reproducing the import after installing PyRCA with pip install .[all] on the reported Ubuntu/OpenJDK environment. Trace the imports through pyrca/graphs/causal/fges.py, pyrca/thirdparty/pytetrad/tools/TetradSearch.py, and translate.py, where edu.cmu.tetrad.data is loaded. Done means importing PC with the domain knowledge example no longer raises the missing Java package error.

Written by the indexing model from the issue text.

Description

Hi, I am using the example code to import PC from pyrca.graphs.casual.pc to use my domain knowledge file. However, there is an error saying a Java package 'edu' is missing:

Traceback (most recent call last):
File "/home/tom/latency_analysis/analysis.py", line 10, in
from pyrca.graphs.causal.pc import PC
File "/home/tom/.local/lib/python3.8/site-packages/pyrca/graphs/causal/init.py", line 8, in
from .fges import FGES, FGESConfig
File "/home/tom/.local/lib/python3.8/site-packages/pyrca/graphs/causal/fges.py", line 15, in
from pyrca.thirdparty.pytetrad.tools.TetradSearch import TetradSearch
File "/home/tom/.local/lib/python3.8/site-packages/pyrca/thirdparty/pytetrad/tools/TetradSearch.py", line 17, in
import pyrca.thirdparty.pytetrad.tools.translate as tr
File "/home/tom/.local/lib/python3.8/site-packages/pyrca/thirdparty/pytetrad/tools/translate.py", line 36, in
import edu.cmu.tetrad.data as td
File "/home/tom/.local/lib/python3.8/site-packages/jpype/imports.py", line 161, in find_spec
raise ImportError("Java package '%s' not found, requested by alias '%s'" % (jname, name))
ImportError: Java package 'edu' not found, requested by alias 'edu'

My environment is Ubuntu 22.04 with openjdk 21.0.4. I install pyrca via the source code and the command pip install . I also installed all dependencies by pip install .[all]. Can you please check?

Dominant language
Python
Stars
572
Forks
69
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from salesforce/PyRCA

All issues in salesforce/PyRCA

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.