Mujoco-py: GLEW initalization error: Missing GL version

Created on 5 Jul 2018  路  2Comments  路  Source: openai/mujoco-py

I'm getting this issue when running
import gym
env = gym.make('Ant-v2')

Mujoco works fine on my machine, I can get the simulations up and running. I've seen this thread but none of the suggestions seem to help.

Any debugging suggestions? What .so files should I expect to have? Where should I expect to find them? What packages should I have installed via apt-get? I'm wondering if one of my installations went wrong somehow.

I'm running on Ubuntu 16.04 with an NVIDIA GeForce GTX 980M graphics card and graphics drivers installed, though I'm not sure that's relevant to this problem.

Most helpful comment

The solution at the bottom of this thread on the openaigym repo seems to work. (The key part being export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so)

All 2 comments

The solution at the bottom of this thread on the openaigym repo seems to work. (The key part being export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so)

The solution at the bottom of this thread on the openaigym repo seems to work. (The key part being export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so)

If you still have some issues try this out (for Ubuntu, I use Ubuntu 18.04)
Step 1
Run update command to update package repositories and get the latest package information.
sudo apt-get update -y
Step 2
Run the install command with -y

flag to quickly install the packages and dependencies.
sudo apt-get install -y libglew-dev

Got these from : https://zoomadmin.com/HowToInstall/UbuntuPackage/libglew-dev
and then
Step 3:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

This worked for me. Hope it works for you.

Was this page helpful?
0 / 5 - 0 ratings