Open fmckenna opened 2 years ago
Switch to linux or windows
Not a Mac user, but try installing Homebrew through a Rosetta terminal, and then install x86-64 Python through that?
Also, you should use Python 3.9. Opspy seems to have dependency issues on 3.10 (i.e. the maintainers have locked the requires to 3.9).
Hi, fmckenna Did you solve this problem? Recently, I encounter the same problem as you. Do you have any suggestions for this problem?
I met same issue.
*****/site-packages/openseespymac/opensees.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
Similar issue here, computer spec:
Chip: Apple M2 Pro
Memory: 16GB
MacOS: 13.0
(apienv) projects/shm-api (BI-469) % pip install openseespy
Requirement already satisfied: openseespy in ./apienv/lib/python3.9/site-packages (3.3.0.1.1)
Requirement already satisfied: openseespymac>=3.3.0.1 in ./apienv/lib/python3.9/site-packages (from openseespy) (3.4.0.2)
(apienv) projects/shm-api (BI-469) % python
Python 3.9.1 (default, Mar 23 2023, 20:56:44)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import openseespy.opensees as ops
Traceback (most recent call last):
File "/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespy/opensees/__init__.py", line 27, in <module>
from openseespymac.opensees import *
ImportError: dlopen(/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so, 0x0002): tried: '/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so' (no such file), '/Users/******/projects/shm-api/apienv/lib/python3.9/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:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespy/opensees/__init__.py", line 30, in <module>
raise RuntimeError('Failed to import openseespy on Mac.')
RuntimeError: Failed to import openseespy on Mac.
>>> import openseespy.opensees as ops
Similar issue here, computer spec:
Chip: Apple M2 Pro
Memory: 16GB
MacOS: 13.0
(apienv) projects/shm-api (BI-469) % pip install openseespy Requirement already satisfied: openseespy in ./apienv/lib/python3.9/site-packages (3.3.0.1.1) Requirement already satisfied: openseespymac>=3.3.0.1 in ./apienv/lib/python3.9/site-packages (from openseespy) (3.4.0.2) (apienv) projects/shm-api (BI-469) % python Python 3.9.1 (default, Mar 23 2023, 20:56:44) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import openseespy.opensees as ops Traceback (most recent call last): File "/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespy/opensees/__init__.py", line 27, in <module> from openseespymac.opensees import * ImportError: dlopen(/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so, 0x0002): tried: '/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespymac/opensees.so' (no such file), '/Users/******/projects/shm-api/apienv/lib/python3.9/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: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/******/projects/shm-api/apienv/lib/python3.9/site-packages/openseespy/opensees/__init__.py", line 30, in <module> raise RuntimeError('Failed to import openseespy on Mac.') RuntimeError: Failed to import openseespy on Mac. >>> import openseespy.opensees as ops
Same here.
Same issue with the M2 pro chipset. I wanted to try helping to a friend. But I can't even import the library. lol.
The problem was solved in my case after applying the steps below.
You can solve this also via Miniconda, which then still allows using Spyder as IDE as normal. Please see: https://github.com/zhuminjie/OpenSeesPy/issues/128#issuecomment-1942717317
Stevan!