Skip to content

Alternative Python linkage #9188

Answered by Myoldmopar
airallergy asked this question in Q&A
Nov 14, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

I would highly suggest not actually using the Python Plugin system in this case, but rather call EnergyPlus through the Python API. The approach is actually quite similar, the fundamental being that instead of relying on a packaged EnergyPlus Python version, you simply call the EnergyPlus API from your own Python install. This way you can use any Python version you want, and any extra libraries you want.

We do have a few examples of this, such as here: https://github.com/NREL/EnergyPlus/blob/develop/tst/EnergyPlus/api/TestRuntime.py#L77. The steps are basically:

  • Change your Python Plugin class method into a callback function in your Python file
  • Create an EnergyPlus state instance
  • Registe…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@airallergy
Comment options

@Myoldmopar
Comment options

@airallergy
Comment options

Answer selected by airallergy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants