mujoco-py icon indicating copy to clipboard operation
mujoco-py copied to clipboard

fatal error: GL/glew.h: No such file or directory 4 | #include <GL/glew.h>

Open qinmoelei opened this issue 2 years ago • 4 comments

My python version is 3.8.5 My problem is that after I have installed the mujoco and try it using the following code

import os
import mujoco_py
print(os.environ.get("LD_LIBRARY_PATH", ""))
mj_path = mujoco_py.utils.discover_mujoco()
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = mujoco_py.load_model_from_path(xml_path)
sim = mujoco_py.MjSim(model)

print(sim.data.qpos)

The following error occurs

 fatal error: GL/glew.h: No such file or directory
    4 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.

The problem is that I do not have the root authority to use the command

sudo apt-get install libglew-dev

What should I do?

qinmoelei avatar Oct 10 '22 05:10 qinmoelei

You can follow #627

Kelym avatar Jan 15 '23 04:01 Kelym

The command works for me. Thx

238Ver avatar May 03 '23 02:05 238Ver

I solved this issue with conda. sudo apt install ligblew-dev

02WYF23 avatar Apr 21 '24 12:04 02WYF23

c++ suports path include #include </Users/clerdson/Desktop/glew/include/GL/glew.h>

clerdson avatar May 07 '24 01:05 clerdson