Hi,
I have the same problem as Carlo. I have an Arm64 Mac, and I am trying to run a script on python using Moco.
First I created a conda environment with python 3.8, and installed the opensim package using the command line:
Code: Select all
conda install -c opensim-org opensim
I managed to import opensim in the script however the following intruction
Code: Select all
study = tracking_problem.initialize()
gives me this error:
Code: Select all
Traceback (most recent call last):
File "/Users/camilleguillaume/Documents/MasterThesis/assistive-arm/scripts/assistiveForce_camille.py", line 113, in <module>
main()
File "/Users/camilleguillaume/Documents/MasterThesis/assistive-arm/scripts/assistiveForce_camille.py", line 96, in main
study = tracking_problem.initialize()
File "/Users/camilleguillaume/opt/anaconda3/envs/assistive_arm/lib/python3.8/site-packages/opensim/moco.py", line 9355, in initialize
return _moco.MocoTrack_initialize(self)
RuntimeError: std::exception in 'OpenSim::MocoStudy OpenSim::MocoTrack::initialize()': MocoCasADiSolver is not available.
Thrown at MocoCasADiSolver.cpp:91 in createGuess().
Then, I saw this post and created a new conda x64 Python environment using the Stack Overflow post mentioned.
I downloaded Opensim 4.5 and tried to install opensim via the <install_dir>/sdk/Python directory using the command line mentioned:
python -m pip install .
But I get this error:
Code: Select all
Processing /Applications/OpenSim 4.5/OpenSim 4.5.app/Contents/Resources/opensim/sdk/Python
Preparing metadata (setup.py) ... done
Building wheels for collected packages: opensim
Building wheel for opensim (setup.py) ... error
error: subprocess-exited-with-error
x python setup.py bdist_wheel did not run successfully.
I exit code: 1
--> [5 lines of output]
running bdist_wheel
running build
running build_py
running egg_info
error: Cannot update time stamp of directory 'opensim.egg-info'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opensim
Running setup.py clean for opensim
Failed to build opensim
ERROR: Could not build wheels for opensim, which is required to install pyproject.toml-based projects
Does anybody have an idea how can I fix this? Or another way to install opensim/opensim-moco on a python environment?
Best
Camille