Got "undefined symbol" When Importing suite
See original GitHub issueHi, there!
I followed the installation instructions and installed the package successfully. But when I did from dm_control import suite
, I got an error like this:
>>> from dm_control import suite
WARNING: Logging before flag parsing goes to stderr.
W0103 17:33:16.675210 140177339770624 __init__.py:35] mjbindings failed to import mjlib and other functions. libmujoco.so may not be accessible.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/suite/__init__.py", line 28, in <module>
from dm_control.suite import acrobot
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/suite/acrobot.py", line 26, in <module>
from dm_control import mujoco
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/__init__.py", line 18, in <module>
from dm_control.mujoco.engine import action_spec
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/engine.py", line 43, in <module>
from dm_control.mujoco import index
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/index.py", line 94, in <module>
from dm_control.mujoco.wrapper import util
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/wrapper/__init__.py", line 25, in <module>
from dm_control.mujoco.wrapper.core import callback_context
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/wrapper/core.py", line 34, in <module>
from dm_control.mujoco.wrapper.mjbindings import functions
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/wrapper/mjbindings/functions.py", line 22, in <module>
mjlib = util.get_mjlib()
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/site-packages/dm_control/mujoco/wrapper/util.py", line 96, in get_mjlib
return ctypes.cdll.LoadLibrary(_get_full_path(raw_path))
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/ctypes/__init__.py", line 429, in LoadLibrary
return self._dlltype(name)
File "/home/zeyu/anaconda3/envs/mujoco/lib/python3.5/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/zeyu/.mujoco/mjpro150/bin/libmujoco150.so: undefined symbol: __glewBlitFramebuffer
I tried to test Mujoco independently by runing $HOME/.mujoco/mjpro150/bin/simulate
and it worked well.
My OS is Ubuntu 16.04 and I am using Python 3.5.4.
Can anyone help me with this?
Thanks a lot!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:10 (1 by maintainers)
Top Results From Across the Web
getting `undefined symbol` errors when trying to import shared ...
I tried to reproduce this and got two different error messages 'like undefined symbol'. I'll explain both since I'm not 100% sure which...
Read more >Import Shared Library Wizard Reports Undefined Symbols - NI
When I try to import it using the Import Shared Library wizard, it reports: Undefined symbols can prevent the wizard from recognizing ...
Read more >WebAssembly lld port — lld 16.0.0git documentation
Undefined symbols generate WebAssembly imports, including undefined data symbols. This is somewhat similar to the –import-undefined option but works all symbol ...
Read more >Undefined Symbol First Referenced in File XXX Error - TI E2E
Looking at the steps described, it sounds like you were somehow importing an older version of the project (where paths were set to...
Read more >TelApy import error (1/1) - TELEMAC-MASCARET Forum :: Topic
But when i try to import the api module in python,seems some error happens from mpi. import _api ImportError: ./lib/_api.so: undefined symbol: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I just ran into this myself. If you have an Nvidia graphics card, a workaround for the time being is:
First, make sure that you have GLFW and GLEW installed:
sudo apt-get install libglfw3 libglew2.0
Then, preload GLEW and OpenGL into the Python process. This can be done by running:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so.2.0:/usr/lib/nvidia-381/libGL.so python
(replacingnvidia-381
with the version installed on your own machine as appropriate, you can runnvidia-smi
to determine the driver version currently in use).Do not set the
LD_PRELOAD
environment variable globally in your shell, though!EDIT: More generally, run
ldd $(which glxinfo) | grep libGL.so
to find the path to the correctlibGL.so
file. Use that path in theLD_PRELOAD
above, instead of thenvidia-381
path.This didn’t quite work for me on Ubuntu 16.04 LTS, but the following works: