Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems to fail on an M1 Mac. #89

Open
fmckenna opened this issue May 17, 2022 · 10 comments
Open

seems to fail on an M1 Mac. #89

fmckenna opened this issue May 17, 2022 · 10 comments

Comments

@fmckenna
Copy link
Contributor

OpenseesPY__m1

Stevan!

@mhscott
Copy link
Collaborator

mhscott commented May 27, 2022

Switch to linux or windows

@firai
Copy link

firai commented May 27, 2022

Not a Mac user, but try installing Homebrew through a Rosetta terminal, and then install x86-64 Python through that?

@firai
Copy link

firai commented Jun 2, 2022

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).

@doub1emint
Copy link

Hi, fmckenna
Did you solve this problem? Recently, I encounter the same problem as you. Do you have any suggestions for this problem?

@hiroakikawamura
Copy link

I met same issue.

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

@Biaggio74
Copy link

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

@ChuandongXie
Copy link
Contributor

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.

@burakai
Copy link

burakai commented Nov 7, 2023

Same issue with the M2 pro chipset. I wanted to try helping to a friend. But I can't even import the library. lol.

@serkanhasanoglu
Copy link

The problem was solved in my case after applying the steps below.

  1. Install Rosetta
  2. Create a Rosetta terminal
  3. Install X86 homebrew in the Rosetta terminal
  4. Create an alias for the X86 homebrew in /usr/local/bin/brew
  5. Use the X86 brew to install X86 python (ends up /usr/local/bin/python3)
  6. pip install

@ihsanenginbal
Copy link

You can solve this also via Miniconda, which then still allows using Spyder as IDE as normal. Please see:
#128 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants