[Python] Jpype: ModuleNotFoundError: No module named 'software'

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    I am trying to import event-ruler library to Python,

    However, I am unable to import the required classes from the library into my code, the classes are not being recognized or imported successfully.

    Since I tried several things, but now:

    import jpype

    jar_files = [
    "/content/event-ruler-1.8.1.jar",
    "/content/fastdoubleparser-2.0.0.jar",
    "/content/jackson-databind-2.18.0.jar",
    "/content/jmh-core-1.37.jar",
    "/content/jmh-generator-annprocess-1.37.jar",
    "/content/jsr305-3.0.2.jar",
    "/content/junit-4.13.2.jar"
    ]

    jvmPath = jpype.getDefaultJVMPath()

    classpath = ":".join(jar_files)

    jpype.startJVM(jvmPath, classpath=classpath)


    Then trying to Import the library

    from software.amazon.event.ruler import Ruler


    And getting this error:

    ---------------------------------------------------------------------------
    ModuleNotFoundError Traceback (most recent call last)
    <ipython-input-14-11ca43dc03d7> in <cell line: 1>()
    ----> 1 from software.amazon.event.ruler import ACStep

    ModuleNotFoundError: No module named 'software'

    Continue reading...

Compartilhe esta Página