I'm trying to use the OpenSim Python libraries with the native Python that comes with my M1 Mac laptop.
When I try to `import opensim as osim`, I get an error:
Code: Select all
Python 3.10.9 (main, Dec 15 2022, 17:11:09) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
ImportError: dlopen(/Applications/OpenSim 4.4/sdk/Python/opensim/_simbody.so, 0x0002): tried: '/_simbody.so' (no such file), '/Applications/OpenSim 4.4/sdk/lib/_simbody.so' (no such file), '/Applications/OpenSim 4.4/sdk/Python/opensim/_simbody.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/OpenSim 4.4/sdk/Python/opensim/_simbody.so' (no such file), '/Applications/OpenSim 4.4/sdk/Python/opensim/_simbody.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/_simbody.so' (no such file), '/Applications/OpenSim 4.4/sdk/lib/_simbody.so' (no such file), '/Applications/OpenSim 4.4/OpenSim 4.4.app/Contents/Resources/opensim/sdk/Python/opensim/_simbody.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/OpenSim 4.4/OpenSim 4.4.app/Contents/Resources/opensim/sdk/Python/opensim/_simbody.so' (no such file), '/Applications/OpenSim 4.4/OpenSim 4.4.app/Contents/Resources/opensim/sdk/Python/opensim/_simbody.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
I believe this is because the .so libraries were build on an intel-based Mac (x86_64) but I need the libraries built for Mac silicon (arm64). Is it possible to get Mac Silicon libraries built? I tried to build from source, but the build script stopped because I don't have Matlab installed. Is there a way to build without the Matlab dependencies?
Regards,
Victor