EnergyPlus API on Apple Silicon Macs [closed]

asked 2023-02-27 21:45:00 -0500

immo234's avatar

updated 2023-03-01 23:31:32 -0500

Hi All,

Beginning to cut my teeth on the world of OpenStudio and E+. I wanted to try calling the API through python on my Apple Silicon Mac and got a dlopen error for being on an arm64 system vs x86_64 when assigning the api (my_api =EnergyPlusAPI()). I downloaded the correct E+ version for my system and have been able to run simulations through eppy and using E+ in the terminal itself. Has anyone encountered this? Still a newbie so not sure if there is something simple I'm overlooking. Some research has pointed me to a possible issue with using Anaconda, but haven't been able to narrow it down.

EDIT: After more research and digging, the problem WAS Anaconda Python. It seems this was running through Rosetta rather than native on the system (a common problem from what I have discovered). Using a different interpreter (Mambaforge for example) with a native Apple Silicon installer seems to have fixed the issue. I hope this helps someone in the future!


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by immo234
close date 2023-03-01 23:32:22.169582


@immo234 can you specify what EnergyPlus version you are trying to use the EnergyPlus Python API for? Also, at the bottom of the release notes page for each version, you can find a different installer for each compatible system. It sounds like you should use a Mac OS installer for ARM64.

Aaron Boranian's avatar Aaron Boranian  ( 2023-02-28 08:27:06 -0500 )edit

Hi @Aaron Boranian thanks for your reply. Using the latest version (22-2-0), I double checked to make sure I used the arm64 installer and reinstalled, still having the same issue. I am able to run simulations in the terminal both via eppy and calling the actual program, but get a dlopen error in python when defining the api class. Some research online has me thinking this could be an issue with Anaconda Python, but wasn't sure if others had a similar situation.

immo234's avatar immo234  ( 2023-02-28 18:41:36 -0500 )edit

@immo234 thanks for clarifying. Can you update your post to include the full text of the dlopen error that you're getting? That would help others provide better solutions.

Aaron Boranian's avatar Aaron Boranian  ( 2023-03-01 09:40:26 -0500 )edit

@Aaron Boranian I had added the error but thankfully discovered my solution - added that to the post in case anyone comes across this in the future. Thanks again!

immo234's avatar immo234  ( 2023-03-01 23:32:10 -0500 )edit

I would change your "EDIT" into an actual answer (it's perfectly fine to answer your own question!)

Julien Marrec's avatar Julien Marrec  ( 2023-03-02 04:57:13 -0500 )edit