Page 1 of 1
Installation Moco on Conda on macOS
Posted: Wed Apr 03, 2024 2:19 am
by ventosudos
Hi everyone,
I'm a beginner in OpenSim and OpenSim Moco, I try to install it on my laptop which is a mac. I install the OpenSim pkg which give an application, and I try to install Moco on Conda but the the problem is related to the moco version (0.4) for Mac. In Windows, it is 4.5.ipopt is a basic library that should be covered in this version and it is not. So I don't really know what to do or follow any idea ?
Re: Installation Moco on Conda on macOS
Posted: Wed Apr 03, 2024 10:16 am
by nbianco
Hi Louis,
If you've installed OpenSim 4.5 manually, then it already includes Moco!
Are you trying to install OpenSim via the pre-built conda packages? The officially released conda packages do not yet support Moco.
If you want to install OpenSim into a conda environment: create and activate the environment, navigate to "C:\OpenSim 4.5\sdk\Python", and run the following line:
Note that this installer should work for a generic Python environment, not just Python.
Best,
Nick
Re: Installation Moco on Conda on macOS
Posted: Tue Apr 09, 2024 4:50 am
by ventosudos
Thanks a lot for the answer, I think a almost fix the issue. Now I just have two issues :
- First, when I create a virtual conda env to install Moco as you advice me, it works perflecty. However, when I try to write a code using opensim importation, I have an error as I didn't install the package even if the same importation works in the terminal.
- Second, how do you work with unix command to open OpenSim with python like :
os.add_dll_directory('...')
because this command is not avaible on macos.
Thanks again for your precious help and have a great day !
Re: Installation Moco on Conda on macOS
Posted: Tue Apr 09, 2024 9:30 am
by nbianco
Hi Louis,
If you're installing the Python interface from the OpenSim 4.5 release, you shouldn't need to call "os.add_dll_directory()". Could you provide more details on the steps that you've tried and the error message you are receiving?
-Nick
Re: Installation Moco on Conda on macOS
Posted: Tue Apr 09, 2024 11:36 am
by ventosudos
Ok I see my issue but I don't know how to fix it. The error comes when I restart de environnment and it is about the library and this command :
export DYLD_LIBRARY_PATH="/Applications/OpenSim\ 4.5/sdk/lib"
export DYLD_LIBRARY_PATH="/Applications/OpenSim\ 4.5/sdk/Simbody/lib"
It not really export the library so the importation can't do it.
Re: Installation Moco on Conda on macOS
Posted: Thu Jun 13, 2024 12:05 am
by ventosudos
Hi everyone,
We finally managed to successfully install OpenSim on macOS, and it works well. Together with my supervisor, Ana Carolina Cardoso de Sousa, we created a detailed tutorial for installing OpenSim and OpenSim Moco on macOS and Windows for scripting with Python (using PyCharm or VSCode). It is very detailed, but if you encounter any issues, feel free to share them on this forum.
I am also using this thread to share my supervisor's work
. We have developed a predictive framework for functional electrical stimulation (FES) cycling. Please check out this work!
Tutorial Site:
https://anacsousa.notion.site/Tutorial- ... 7f072d6b09
FES Cycling Work:
https://simtk.org/projects/fes-cycling
Ana Carolina Cardoso de Sousa LinkedIn:
https://www.linkedin.com/in/ana-sousa-67523984
Don't hesitate to take a look at this work!
Re: Installation Moco on Conda on macOS
Posted: Mon Jun 17, 2024 12:33 pm
by nbianco
Hi Louis,
Thank you for the detailed instructions! We are working on simplifying the Python installation process in OpenSim soon using conda packages, but I would also like to clean up our installation pages, so this is a great reference point.
Best,
Nick