1. Open a terminal window and create a new environment named “opensim” with python*.*

  2. Activate the environment to work in it and check that the python version installed is the one that you want.

    conda activate opensim
    
    python --version
    
  3. Install numpy and matplotlib in this new environnement cause they are useful and basic packages.

    pip install numpy
    pip install matplotlib
    
  4. Navigate to "/Applications/OpenSim\ 4.5/sdk/Python"

    cd /Applications/OpenSim\\ 4.5/sdk/Python 
    
  5. When you are on the folder, install OpenSim and OpenSim Moco packages. You need to have administrator rights, that’s why we use sudo and you will need to enter your passcode.

    sudo python -m pip install .
    
  6. Test if the installation works, by running :

    python
    
    import opensim as osim
    osim.GetVersionAndDate()
    quit()
    

    <aside> ⚙ Now you have installed OpenSim and OpenSim Moco. There is still one problem: you can use it in this terminal window, but when you want to use it elsewhere, the libraries won't import automatically, and it won't work.

    </aside>

    <aside> 💡 We are going to change the bash of “activate” function, so that as soon as we activate our environment, the libraries will be automatically imported.

    </aside>

  7. Copy the “/Applications/OpenSim\ 4.5/sdk” folder, in “/opt/anaconda3/envs/opensim/lib”.

  8. To test if everything works well, open a new terminal and try commands from 6. It should print the same thing as before.

    conda activate opensim
    python
    
    import opensim as osim
    osim.GetVersionAndDate()
    quit()
    
  9. The next step is to setup an IDE, you can use as you want VS Code or Pycharm, the installation steps are the same regardless of your OS.


Previous step:

3) Install Anaconda (macOS)

Next step:

Setup VS Code or

Setup Pycharm