OpenWaterAnalytics / EPyT

EPyT: An EPANET-Python Toolkit for Smart Water Network Simulations
https://epanet-python-toolkit-epyt.readthedocs.io
European Union Public License 1.2
39 stars 26 forks source link

Crash on modern Mac architecture because of incompatible architecture #51

Closed andreArtelt closed 4 months ago

andreArtelt commented 5 months ago

I get the following error when running EPyT on a modern Mac:

/epyt/libraries/mac/libepanet2.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I think this is because of the new CPU architecture. It looks like the pre-compiled binary was compiled for a single architecture only.

I suggest that EPyT either ships a separate library for each architecture (arm64 and x86_64) or compiles the library locally when it is installed.

Mariosmsk commented 4 months ago

We updated the Mac libraries for the latest version of the EPyT v1.1.7.

Also, the user can use custom libraries:

epanetlib=os.path.join(os.getcwd(), 'epyt','libraries','win','epanet2.dll')
msxlib=os.path.join(os.getcwd(), 'epyt','libraries','win','epanetmsx.dll')
d = epanet(inpname, customlib=epanetlib)
d.loadMSXFile(msxname, customMSXlib=msxlib)