Dear,
When following the installation guide on the website: https://simtk-confluence.stanford.edu:8 ... +in+Python
the following error appears:
ImportError: DLL load failed while importing _simbody: cannot find given module.
The website says: 'If you get an error about loading DLL failure check that PATH has been updated correctly before relaunching the shell' ( ) but I feel like the path is correct and the simbody file is in the map ( see ).
How and to which path should I change to be able to import _simbody?
I am looking forward to your response.
Kind regards,
Jip Helsloot
ImportError: DLL load failed while importing _simbody
- Jip Helsloot
- Posts: 6
- Joined: Wed May 03, 2023 1:49 am
- Mohammadreza Rezaie
- Posts: 408
- Joined: Fri Nov 24, 2017 12:48 am
Re: ImportError: DLL load failed while importing _simbody
Hi, please specify the versions of OpenSim and Python installed. Also, do you use official Python or Conda distribution?
- Matthias Kindler
- Posts: 9
- Joined: Tue Dec 06, 2022 1:02 am
Re: ImportError: DLL load failed while importing _simbody
Hello, for me this helped:
I guess you are using windows...
I had to add these two lines before every opensim import...
import os
os.add_dll_directory("C:/OpenSim 4.4/bin")
"C:/OpenSim 4.4/bin" could be different depending on where you installed Opensim
I guess you are using windows...
I had to add these two lines before every opensim import...
import os
os.add_dll_directory("C:/OpenSim 4.4/bin")
"C:/OpenSim 4.4/bin" could be different depending on where you installed Opensim
- Jip Helsloot
- Posts: 6
- Joined: Wed May 03, 2023 1:49 am
Re: ImportError: DLL load failed while importing _simbody
I tried this because I am working on windows:
import os
os.add_dll_directory("C:/OpenSim 4.4/bin")
Unfortunately this didn't work for me, I still get the same error.
@Mohammadreza Rezaie
My OpenSim version is 4.4 and my python version is 3.9
I used anaconda and spyder.
Best,
Jip
import os
os.add_dll_directory("C:/OpenSim 4.4/bin")
Unfortunately this didn't work for me, I still get the same error.
@Mohammadreza Rezaie
My OpenSim version is 4.4 and my python version is 3.9
I used anaconda and spyder.
Best,
Jip
- Mohammadreza Rezaie
- Posts: 408
- Joined: Fri Nov 24, 2017 12:48 am
Re: ImportError: DLL load failed while importing _simbody
The package comes with OpenSim 4.4 installer works with Python 3.8 only. But you can use the conda package that works with recent versions: https://anaconda.org/opensim-org/opensim