opensim-core: ModuleNotFoundError No module named '_simbody'
Hello,
Following setup:
- win10
- anaconda
- visual studio 2019 (v16.8.6)
- cmake 3.19.5
- swigwin 3.0.12
- opensim 4.1
- opensim python wrapping
- simbody master commit 9daf0d26ea22551a5d10114bffd9b02fa51c53bc
Due to an error while installing opensim dependencies / simbody with latest Version of Visual Studio 2019 compiling simbody 3.7 release I installed simbody manually using simbody bleedingedge master (commit 9daf0d26ea22551a5d10114bffd9b02fa51c53bc). This includes a merge of following pull request, wich solves an issue with the Visual Studio 2019: https://github.com/simbody/simbody/pull/707. Installation (as described here: https://github.com/simbody/simbody/tree/9daf0d26ea22551a5d10114bffd9b02fa51c53bc#windows-using-visual-studio) was successfull (run_tests_parallel succeeded without any error). After that installed opensim 4.1 release from source. (including opensim python wrapping). Opensim installation with visual studio 2019 was successfull, (run all tests parallel without any error). Installing opensim, set path variable and install setup.py in the conda env were done.
After installing opensim opensim module is recognized in our python repository, but the simbody submodule is not:
Exception has occured: ModuleNotFoundError
No module named '_simbody'
Is that still an error of simbody or a problem with opensim? Any idea how to fix this?
kind regards, patrisity
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (23 by maintainers)
Commits related to this issue
- Use simbody fix to handle latest msvc (#2912) — committed to opensim-org/opensim-core by aymanhab 4 years ago
For anyone trying to set a conda environment up to add/remove
LD_LIBRARY_PATHon activation/deactivation (probably me in the future), here’s what I did I used: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#macos-and-linux as a guide.Then, when you
conda activate env_nameit will add$CONDA_PREFIX/libtoLD_LIBRARY_PATHand when youconda deactivateit will return theLD_LIBRARY_PATHto what it was before activation. The one downside is that this might cause issues if you change the LD_LIBRARY_PATH when an environment is activated (the change you made will be undone when you deactivate).After glancing at the release notes for NumPy 1.20, downgrading to 1.19.2 should be fine. We should also update the
README.mdto include the required NumPy version and also consider implementing some basic error handling when importing the OpenSim python modules.@antoinefalisse I don’t think we need a late version of numpy for OpenSim bindings, if we use 1.19.2 that may work out better for everybody. Not sure how to enforce but would be good to find out first from @nickbianco if that’s the case.
@antoinefalisse version 4.1 of opensim didn’t include or require numpy, so this’s expected