xbpeng / DeepMimic

Motion imitation with deep reinforcement learning.
https://xbpeng.github.io/projects/DeepMimic/index.html
MIT License
2.3k stars 486 forks source link

Python Fail to Import _DeepMimicCore #12

Closed Phazed98 closed 6 years ago

Phazed98 commented 6 years ago

Microsoft Windows [Version 10.0.17134.345] (c) 2018 Microsoft Corporation. All rights reserved.

X:\DeepMimic\DeepMimic>python mpi_run.py Running with 1 workers cmd: mpiexec -n 1 python DeepMimic_Optimizer.py Traceback (most recent call last): File "X:\DeepMimic\DeepMimic\DeepMimicCore\DeepMimicCore.py", line 14, in swig_import_helper return importlib.import_module(mname) File "C:\Program Files\Python36\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 658, in _load_unlocked File "", line 571, in module_from_spec File "", line 922, in create_module File "", line 219, in _call_with_frames_removed ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "DeepMimic_Optimizer.py", line 3, in from env.deepmimic_env import DeepMimicEnv File "X:\DeepMimic\DeepMimic\env\deepmimic_env.py", line 3, in from DeepMimicCore import DeepMimicCore File "X:\DeepMimic\DeepMimic\DeepMimicCore\DeepMimicCore.py", line 17, in _DeepMimicCore = swig_import_helper() File "X:\DeepMimic\DeepMimic\DeepMimicCore\DeepMimicCore.py", line 16, in swig_import_helper return importlib.import_module('_DeepMimicCore') File "C:\Program Files\Python36\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_DeepMimicCore'

I get this error attempting to run mpi_run.py or any of the other python scripts.

I successfully built the wrapper as far as I know (No Build Errors) I unfortunately don't know swig or python well enough to sort this out myself and was looking for some guidance.

xbpeng commented 6 years ago

I usually see this issue if some of the c++ libraries are not installed. Check that you have the OpenGL, glew, and glut dll where they should be.

Phazed98 commented 6 years ago

Thanks, sorted it out. glut dll was out of place.

nghorbani commented 5 years ago

Thanks for sharing your code and being helpful with issues. I have a similar problem in my Ubuntu machine and cannot figure out the cause of the issue. So I wanted to ask where is the correct location for the libraries you mentioned, eg. OpenGL, glew, and glut dll, in Linux?

I am running Ubuntu 18.04 and have the following versions installed with their proper methods:

After all these I still get the following error even after a successful build of the wrapper:

python3 DeepMimic.py --arg_file args/kin_char_args.txt Traceback (most recent call last): File "/me/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 14, in swig_import_helper return importlib.import_module(mname) File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 658, in _load_unlocked File "", line 571, in module_from_spec File "", line 922, in create_module File "", line 219, in _call_with_frames_removed ImportError: libGLEW.so.2.1: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "DeepMimic.py", line 9, in from env.deepmimic_env import DeepMimicEnv File "/me/DeepMimic/env/deepmimic_env.py", line 3, in from DeepMimicCore import DeepMimicCore File "/me/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 17, in _DeepMimicCore = swig_import_helper() File "/me/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 16, in swig_import_helper return importlib.import_module('_DeepMimicCore') File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_DeepMimicCore'

bsivanantham commented 5 years ago

I am having same issue ..

Traceback (most recent call last):
  File "/home/balavivek/PycharmProjects/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/home/balavivek/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /home/balavivek/PycharmProjects/DeepMimic/DeepMimicCore/_DeepMimicCore.so: undefined symbol: _ZN11btMultiBody19setJointPosMultiDofEiPKf

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "DeepMimic.py", line 9, in <module>
    from env.deepmimic_env import DeepMimicEnv
  File "/home/balavivek/PycharmProjects/DeepMimic/env/deepmimic_env.py", line 3, in <module>
    from DeepMimicCore import DeepMimicCore
  File "/home/balavivek/PycharmProjects/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 17, in <module>
    _DeepMimicCore = swig_import_helper()
  File "/home/balavivek/PycharmProjects/DeepMimic/DeepMimicCore/DeepMimicCore.py", line 16, in swig_import_helper
    return importlib.import_module('_DeepMimicCore')
  File "/home/balavivek/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named `'_DeepMimicCore'` 
sloganking commented 5 years ago

@Phazed98 would it be possible for you to write where you found your glut dll and where you ended up putting it?

IntelligentIndia7 commented 5 years ago

I am running the same on Linux and I got the following error. Any help would be great!!!

Traceback (most recent call last): File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 14, in swig_import_helper return importlib.import_module(mname) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 666, in _load_unlocked File "", line 577, in module_from_spec File "", line 906, in create_module File "", line 222, in _call_with_frames_removed ImportError: libGLEW.so.2.1: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "DeepMimic.py", line 9, in from env.deepmimic_env import DeepMimicEnv File "/home/teai/Downloads/DeepMimic/DeepMimic-master/env/deepmimic_env.py", line 3, in from DeepMimicCore import DeepMimicCore File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 17, in _DeepMimicCore = swig_import_helper() File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 16, in swig_import_helper return importlib.import_module('_DeepMimicCore') File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_DeepMimicCore'

bsivanantham commented 5 years ago

@IntelligentIndia7 I had the same issue first check you Glew installation. second check your bullet installation. and Check if /usr/include or /usr/local/include has bullet file. If the file is not available manually run gcc -I and missing files names like -lGLEW -lGL -lGLU -lglut -lBulletDynamics -lBulletCollision -lLinearMath -lm -lstdc++ to /usr/include

for me running gcc solved the issue.

IntelligentIndia7 commented 5 years ago

I had solved the above error by adding the path of libGLEW.so.2.1 to LD_LIBRARY_PATH. Now I am getting the following error. Any help regarding the same? Thanks in advance!!!!

Traceback (most recent call last): File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 14, in swig_import_helper return importlib.import_module(mname) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 666, in _load_unlocked File "", line 577, in module_from_spec File "", line 906, in create_module File "", line 222, in _call_with_frames_removed ImportError: /home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/_DeepMimicCore.so: undefined symbol: _ZN11btMultiBody22addJointTorqueMultiDofEiPKf

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "DeepMimic.py", line 9, in from env.deepmimic_env import DeepMimicEnv File "/home/teai/Downloads/DeepMimic/DeepMimic-master/env/deepmimic_env.py", line 3, in from DeepMimicCore import DeepMimicCore File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 17, in _DeepMimicCore = swig_import_helper() File "/home/teai/Downloads/DeepMimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 16, in swig_import_helper return importlib.import_module('_DeepMimicCore') File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_DeepMimicCore'

IntelligentIndia7 commented 5 years ago

Can some one help me with Bullet installation, I guess the problem is with Bullet.

I just ran build_cmake_pybullet_double.sh with double precision flag set off. Is that the right way or should I follow other method mentioned in Read me of Bullet with premake

bsivanantham commented 5 years ago

Check this link you might get some idea for installation https://github.com/bsivanantham/DeepMimic/blob/master/README.Install.md

Thank You

Regards, Balavivek Sivanantham bala.ac http://bala.ac

On Thu, Mar 7, 2019 at 11:57 AM Mahesh Kumar notifications@github.com wrote:

Can some one help me with Bullet installation, I guess the problem is with Bullet.

I just ran build_cmake_pybullet_double.sh with double precision flag set off. Is that the right way or should I follow other method mentioned in Read me of Bullet with premake

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xbpeng/DeepMimic/issues/12#issuecomment-470481638, or mute the thread https://github.com/notifications/unsubscribe-auth/APoRb8AR0d1EeITrRzw3PwJBZNiAKua-ks5vUPCbgaJpZM4XvgCS .

IntelligentIndia7 commented 5 years ago

I have solved the error by Installing Bullet 2.88 instead of 2.87 and also ran command 'sudo make install' after ./build_cmake_pybullet_double.sh to overcome the linker errors to BulletDynamics and BulletCollision. Thanks for the help @bsivanantham

spodila1 commented 4 years ago

Hello I am getting the errors as some of you mention before. I did ran command 'sudo make install' after ./build_cmake_pybullet_double.sh but the problem is not be solved. Could anyone please help me on this.

Traceback (most recent call last): File "DeepMimic.py", line 9, in from env.deepmimic_env import DeepMimicEnv File "/home/sah.pod/work/Deep-Mimic/DeepMimic-master/env/deepmimic_env.py", line 3, in from DeepMimicCore import DeepMimicCore File "/home/sah.pod/work/Deep-Mimic/DeepMimic-master/DeepMimicCore/DeepMimicCore.py", line 13, in from . import _DeepMimicCore ImportError: /home/sah.pod/work/Deep-Mimic/DeepMimic-master/DeepMimicCore/_DeepMimicCore.so: undefined symbol: _ZN11btMultiBody22addJointTorqueMultiDofEiPKf