OpenSeesPy icon indicating copy to clipboard operation
OpenSeesPy copied to clipboard

Error on ARM architecture Macs while importing

Open siddharthfcb opened this issue 1 year ago • 4 comments

'/lib/python3.10/site-packages/openseespymac/opensees.so' (no such file), '/lib/python3.10/site-packages/openseespymac/opensees.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last) Cell In[4], line 8 6 import numpy.matlib as mtlib 7 import scipy.linalg as slin ----> 8 import openseespy.opensees as ops

File ~/anaconda3/lib/python3.10/site-packages/openseespy/opensees/init.py:30 27 from openseespymac.opensees import * 29 except: ---> 30 raise RuntimeError('Failed to import openseespy on Mac.') 33 else: 35 raise RuntimeError(sys.platform+' is not supported yet')

RuntimeError: Failed to import openseespy on Mac.

I think I am working on Anaconda/Jupyter for M1/M2 Macs and that might be the reason. Worked fine on intel Mac versions.

Installing with Anaconda installer older that 2022.10 supported for intel architecture helps prevent this problem. However need to run through rosetta.

siddharthfcb avatar Jul 01 '23 13:07 siddharthfcb

OpenSeesPy is not running on M1/M2.

zhuminjie avatar Jul 01 '23 16:07 zhuminjie

Hi @zhuminjie,

So what does the procedure detailed in this Opensees community post do?

UzoUwaoma avatar Aug 22 '23 20:08 UzoUwaoma

Hi @zhuminjie, is there any update on the M1/M2 compatibility of OpenseesPy? Also, @SerkanHasanoglu, how did you make it work with the conda environment? I tried conda install openseespy, but conda can't find openseespy. Although I can pip install openseespy, I can't import it with import openseespy.opensees as ops. I got RuntimeError: Failed to import openseespy on Mac.

cedavidyang avatar Jan 07 '24 16:01 cedavidyang

Hey cedavidyang, have you found a solution? I am also having the same issue when I try to use opensees.so that I compiled after adding a new material. But when I use pip install openseespy and import it to the script it works on [email protected].

Omar-A-M avatar Jan 15 '24 02:01 Omar-A-M