opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
758 stars 307 forks source link

DLL load failed while importing _simbody #3780

Open hmejbri opened 1 month ago

hmejbri commented 1 month ago

I get this error when running & 'opensim-core-windows-build-script.ps1' to build opensim on windows

ImportError: Failed to import test module: test_swig_additional_interface Traceback (most recent call last): File "C:\Users\Houssem\AppData\Local\Programs\Python\Python39\lib\unittest\loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "C:\Users\Houssem\AppData\Local\Programs\Python\Python39\lib\unittest\loader.py", line 377, in _get_module_from_name import(name) File "C:\opensim-core\sdk\python\opensim\tests\test_swig_additional_interface.py", line 9, in import opensim as osim File "C:\opensim-core\sdk\python\opensim__init__.py", line 18, in from .simbody import * File "C:\opensim-core\sdk\python\opensim\simbody.py", line 10, in from . import _simbody ImportError: DLL load failed while importing _simbody: The specified module could not be found.

nickbianco commented 3 weeks ago

@AlbertoCasasOrtiz do you know if running the build scripts on Windows requires extra steps for setting up a Python environment for the Python tests to pass? Or should everything just run out-of-the-box?

AlbertoCasasOrtiz commented 3 weeks ago

I think it should work. If I'm not wrong, the scripts install Python and numpy, but I recently discovered it has problems if multiple python versions are installed. I'm working on solving that.

nickbianco commented 3 weeks ago

@hmejbri do you have multiple Python versions installed? What Python enviroment manager are you using (if any)?

aymanhab commented 3 weeks ago

For the record, we're using python 3.10 on ci, in the unlikely case the problem is python version specific.