1. Download and install VS Code.
  2. Go on the extensions window on the left bar and type “Python” in the research field. You need to install the first one developed by Microsoft, click on the blue button to install it.

Screenshot 2024-05-06 at 11.09.17.png

<aside> 💡 As I already installed it, the blue button is not here on the screenshot.

</aside>

  1. Create a main.py welcome script. To choose your conda environment, you need to press “Cmd+Shift+P” and search “Select interpreter”, then you need to choose your environnement, here “opensim”.

    Screenshot 2024-05-06 at 14.37.15.png

    Screenshot 2024-05-06 at 14.39.02.png

  2. Go to the settings.json file and add this line. Then relaunch VS Code:

    "terminal.integrated.inheritEnv": false,
    "python.terminal.executeInFileDir": true,
    "terminal.integrated.defaultProfile.osx": "zsh",
    "terminal.integrated.env.osx": { "PYTHONPATH": "${workspaceFolder}/:${workspaceFolder}/.."}
    
  3. Edit main.py:

    import opensim as osim
    print(osim.GetVersionAndDate())
    quit()
    
  4. Run the code by using the play button on the upper right corner, you will see a message similar to this on the terminal at the bottom of the windows.

    C:\\ProgramData\\anaconda3\\python.exe C:\\Users\\anacs\\PycharmProjects\\pythonProject\\main.py 
    version 4.4.1-2023-07-13-710e13be5, build date 09:37:16 Jul 14 2023
    
    Process finished with exit code 0
    

Previous step:

3) Python environment with Moco (Windows)

4) Python environment with Moco (macOS)

Next step :

None. All done! 🎉