football: [Ubuntu 16.04] libGL error when trying to play the game
when I run the python3 -m gfootball.play_game
, error shows that:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Couldn't load GL function glBegin: No GL driver has been loaded
Also happen in python3 -m gfootball.examples.run_ppo2 --dump_full_episodes=True --render=True
But when I try another pygame example python3 -m pygame.examples.aliens
, it works
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 25
I also ran into this same issue (Ubuntu 18.04, Cuda 10, and my OpenGL was working). I tried all the things suggested here, including the one given by @WOWNICE , but still didn’t work for me. I finally got it to work, so sharing it in case it helps anyone else.
I noticed that
/usr/lib/x86_64-linux-gnu/libGL.so
pointed to/usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
(which was a broken link). So I remove the broken link and then created a new one:sudo rm libGL.so
sudo ln -s libGL.so.1 libGL.so
Then I went back to the root football directory and ran:
pip3 install .[tf_gpu]
and it worked.
Note that I did add the line to the CMakeLists.txt from #12 (but I don’t know if it would have worked without it).