Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about import mujoco_py #772

Open
zcswdt opened this issue Jun 12, 2023 · 3 comments
Open

about import mujoco_py #772

zcswdt opened this issue Jun 12, 2023 · 3 comments

Comments

@zcswdt
Copy link

zcswdt commented Jun 12, 2023

import mujoco_py
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/mujoco_py/init.py", line 2, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/usr/local/lib/python3.8/dist-packages/mujoco_py/builder.py", line 504, in
cymj = load_cython_ext(mujoco_path)
File "/usr/local/lib/python3.8/dist-packages/mujoco_py/builder.py", line 74, in load_cython_ext
_ensure_set_env_var("LD_LIBRARY_PATH", lib_path)
File "/usr/local/lib/python3.8/dist-packages/mujoco_py/builder.py", line 120, in _ensure_set_env_var
raise Exception("\nMissing path to your environment variable. \n"
Exception:
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=/usr/local/lib/python3.8/dist-packages/torch/lib:/usr/local/lib/python3.8/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.mujoco/mujoco210/bin

@abdulghani91
Copy link

I have the same problem I added the LD_LIBRARY_PATH, but it still does not work did you find any solution?

import mujoco_py
Traceback (most recent call last):
File "", line 1, in
File "/home/user/.local/lib/python3.10/site-packages/mujoco_py/init.py", line 2, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/home/user/.local/lib/python3.10/site-packages/mujoco_py/builder.py", line 504, in
cymj = load_cython_ext(mujoco_path)
File "/home/user/.local/lib/python3.10/site-packages/mujoco_py/builder.py", line 74, in load_cython_ext
_ensure_set_env_var("LD_LIBRARY_PATH", lib_path)
File "/home/user/.local/lib/python3.10/site-packages/mujoco_py/builder.py", line 120, in _ensure_set_env_var
raise Exception("\nMissing path to your environment variable. \n"
Exception:
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=/usr/local/cuda-12.2/lib64${LD_LIBRARY_PATH:+:}
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/.mujoco/mujoco210/bin

@Anna-fence
Copy link

I meet the problem too. The solution in this issue #267 works for me.

@sainavaneet
Copy link

use this commands in terminal

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/.mujoco/mujoco210/bin' >> ~/.bashrc
next
source ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants