Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import olca "no module found" eclipse #31

Open
dilull0 opened this issue Jan 18, 2022 · 2 comments
Open

import olca "no module found" eclipse #31

dilull0 opened this issue Jan 18, 2022 · 2 comments

Comments

@dilull0
Copy link

dilull0 commented Jan 18, 2022

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.

@msrocka
Copy link
Member

msrocka commented Jan 21, 2022

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.

@dilull0
Copy link
Author

dilull0 commented Jan 21, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants