Closed guoling13 closed 1 year ago
The error message you reported is due to the fact that the OpenSim application is built with x86_64 architecture /stack, while the python you're trying to use is built for M1 (arm64). There are two solutions to this problem:
The error message when building from source is due to missing numpy, you should install numpy first to the python you're using for the build and then build will go through
The published conda package is also based on x86_64 architecture, if you want to build the stack on M1 (arm64) and make a PR to help that would be much appreciated.
@carmichaelong do we have enough info to document building the stack (with or without Moco) on Apple silicon? I remember you had some version working locally at some point. If that's documented in another issue/PR please point there and you can close this one. Thank you.
Issue: https://github.com/opensim-org/opensim-core/issues/3168 PR: https://github.com/opensim-org/opensim-core/pull/3192
The issue has some instructions to build using the branch from the PR that worked for another user. We can close this issue since the other one can track this as well.
I have downloaded the OpenSim 4.4 GUI on my M1 Mac and it is working well. However, I am working on a project that will require accessing and modifying the source code, either directly in the C++ code, or using scripting in Python.
I tried setting up OpenSim scripting in Python following the instructions from here https://simtk-confluence.stanford.edu:8443/display/OpenSim/Scripting+in+Python. I was able to install the opensim package but could not import it. This was the error I got:
From what I understand ‘arm64’ refers to the chip in the M1 mac. I also tried building the conda package following instructions here: https://github.com/opensim-org/conda-opensim, but this seems to require python 3.7 and other dependencies which my M1 mac doesn’t support.
I also tried building opensim-core following this: https://github.com/opensim-org/opensim-core/wiki/Build-Instructions. I ran the .sh script and a lot of things were installed but I got this error at the end:
My computer specs MacBook Pro 14", 2021 Apple M1 Max, 32GB memory OS Ventura 13.3.1