Can't import opensim library in python
Posted: Sat Mar 11, 2023 7:17 am
Hello. I want to run a CMC Simulation using a python script. I am using Windows with Python 3.10.9(no conda) and OpenSim 4.4. I followed the instructions as in https://simtk-confluence.stanford.edu:8 ... +in+Python
I try to run this code
I get this error
What may be the problem?
I try to run this code
Code: Select all
import opensim as osim
model = osim.Model("model.osim")
cmcTool = osim.CMCTool("CMC_Setup.xml")
cmcTool.setModel(model)
cmcTool.run()
I get this error
Code: Select all
Traceback (most recent call last):
File "script_directory\CMC_Run.py", line 1, in <module>
import opensim as osim
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\opensim\__init__.py", line 9, in <module>
from .simbody import *
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\opensim\simbody.py", line 13, in <module>
from . import _simbody
ImportError: DLL load failed while importing _simbody: The specified module could not be found.