Skip to content

import olca "no module found" eclipse #31

Description

@dilull0

I am trying to work with openlca using eclipse to automate data updates based on data collected from Excel. When I try to run import olca command from eclipse I get an error saying the "no module found" I have been through every installation guide and cannot figure out how to get this to work. I installed olca-ipc using pip, I copied the libs folder from openlca into the C:\Users*****\openLCA-data-1.4\html\olca-app folder. It still does not work. I am using the most current installation for everything. I have lots of coding experience with VBA, R, and MATLAB, but am new to python.

Activity

  1. msrocka commented on Jan 21, 2022

    @msrocka
    Member

    The olca module comes with olca-ipc.py but it only works in standard Python and communicates with openLCA via an http server (you need to start it in openLCA via Tools > Developer tools > IPC server). The Python scripts that you can run in openLCA run on Jython which is a Python implementation for the Java virtual machine. The olca module does not work there. Instead you directly call the Java API of openLCA with it.

  2. dilull0 commented on Jan 21, 2022

    @dilull0
    Author

    Just to make sure I understand this correctly.

    When you go Tools>Developer Tools>Python the code here uses jython
    jython uses code like
    from org.openlca.core.database import UnitGroupDao, FlowPropertyDao, CategoryDao, Daos
    key commands can be found in https://github.com/GreenDelta/olca-modules/tree/master/olca-core/src/main/java/org/openlca/core/model

    For IPC Server when written in eclipse or another ide you use olca-ipc.py and the import command should work if I run the code in eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions