stanfordnmbl / osim-rl

Reinforcement learning environments with musculoskeletal models
http://osim-rl.stanford.edu/
MIT License
877 stars 248 forks source link

ModuleNotFoundError: No module named '_simbody' #233

Open NicolasGrandin opened 3 years ago

NicolasGrandin commented 3 years ago

Hello everyone !

I am new to python and opensim, so... ,sorry if my questions are "simple".

I'am currently using OpenSim 4.2. (64 bit) and Python 3.7.10 (64 bit).

When I try to import the opensim package into Python I have this error message :

import opensim Traceback (most recent call last):

File "D:\Anaconda3\envs\OpenSim\lib\site-packages\opensim-4.2_2021_03_12_fcedec9-py3.7.egg\opensim\simbody.py", line 14, in swig_import_helper return importlib.import_module(mname)

File "D:\Anaconda3\envs\OpenSim\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1006, in _gcd_import

File "", line 983, in _find_and_load

File "", line 967, in _find_and_load_unlocked

File "", line 670, in _load_unlocked

File "", line 583, in module_from_spec

File "", line 1043, in create_module

File "", line 219, in _call_with_frames_removed

ImportError: DLL load failed: Le module spécifié est introuvable.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in import opensim

File "D:\Anaconda3\envs\OpenSim\lib\site-packages\opensim-4.2_2021_03_12_fcedec9-py3.7.egg\opensim__init__.py", line 1, in from .simbody import *

File "D:\Anaconda3\envs\OpenSim\lib\site-packages\opensim-4.2_2021_03_12_fcedec9-py3.7.egg\opensim\simbody.py", line 17, in _simbody = swig_import_helper()

File "D:\Anaconda3\envs\OpenSim\lib\site-packages\opensim-4.2_2021_03_12_fcedec9-py3.7.egg\opensim\simbody.py", line 16, in swig_import_helper return importlib.import_module('_simbody')

File "D:\Anaconda3\envs\OpenSim\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)

ModuleNotFoundError: No module named '_simbody'

oskarasbrink commented 3 years ago

having a very similar error with python 3.6.1. Did you fix this?

NicolasGrandin commented 3 years ago

Hi @oskarasbrink ,

I just managed this by changing the installation folder name (frome OpenSim 4.2 to Opensim4.2) and then by installing twice the python setup... Weird but it worked

qmadorell commented 3 years ago

Did it work for both of you? I haven't managed to fix it, I'm working with my mac.

NicolasGrandin commented 3 years ago

I tried with 2 different computers (both windows) and it worked. You may have a problem with admin rights and/or on the installation folder (can't help more I'm not familiar at all with mac)