...
Note |
---|
If using Conda environment we STRONGLY recommend utilizing the conda package directly as a self contained option unrelated to the OpenSim application/GUI, it . It is the only supported mechanism for versions other than python 3.8, if . If using Conda please disregard other installation instructions on this page and follow the link here https://anaconda.org/opensim-org/opensim As of 12/2023, python 3.7 is past end of life thus all instructions specific to versions before OpenSim 4.3 (first version built against python 3.8) are moved to a separate section (old OpenSim/Python combinations) near the bottom of this page, we recommend upgrading to the latest version available if starting to use the OpenSim API from python. Starting with 4.0, OpenSim is distributed as 64-bit only, so you must use 64-bit Python. Python version 3.8 is supported for OpenSim version 4.3+. |
...
- The Python package that comes with the OpenSim GUI distribution is built for a specific python version (OpenSim version 4.3+ distributions bindings were built against python 3.8 exclusively). Users should try to use the Conda packages mentioned above for all variants of python, and let us know if additional variants are needed. If not possible to use Conda, users can follow the installation instructions below (will only work if using the same python version as in the table below) or build the python bindings along with python bindings using their preferred python version from source repository.
OpenSim versions and the corresponding python versions used to build distributions:
OpenSim version Python version Available conda packages 4.3 3.8 - 4.4, 4.4.1 3.8 3.7, 3.8, 3.9 4.5 3.8 3.9, 3.10, 3.11
...
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are a couple options for setting up Python on your Windows machine. You will need the main Python package, as well as NumPy. Alternatively, there are applications such as Anaconda that bundle all the required packages. You can also just set-up Python and the associated packages manually. We have tested both methods, but currently advise you to use Anaconda. Make sure that you get 64-bit Python.
Manual installation from OpenSim GUI distribution, not using Anaconda: If not using Anaconda, please proceed to the following section, only execute steps 1, 6, 9-12 below. Using Anaconda with OpenSim 4.3+ and conda .yml file
Having trouble?
|
Mac
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are 2 possible architectures on OSX: arm64 and intel x86_64. There're conda packages for both, however the GUI distribution includes ONLY x86_64 build with Python 3.8. MacOS comes with some version of Python, but you may also want to obtain Python through Homebrew or the Anaconda Python distribution. Note that the Python package that comes with the OpenSim GUI distribution was built to use the Python that comes with macOS, and it will not work with Homebrew's Python or with Anaconda Python; in the latter cases, you must compile OpenSim from the source code. Navigate to the location of the opensim python package within the OpenSim installation. If you are using OpenSim's GUI distribution, this location is likely /Applications/OpenSim 4.x/sdk/Python. If you built OpenSim from source, this location is likely OPENSIM_INSTALL_DIR>/lib/python3.x/site-packages if using Python ). Perform the following (modifying the path below if necessary):
The OpenSim libraries must be on your DYLD_LIBRARY_PATH:
You can place the above `export` commands in your `~/.bash_profile` file so that they are set whenever you open up a new terminal. You should be ready to use the Python wrapping now. Try the following from any directory:
Step-by-step instructions when using Anaconda with OpenSim 4.3+
|
...