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

could not create GL context #277

Open
msverma101 opened this issue Aug 25, 2023 · 1 comment
Open

could not create GL context #277

msverma101 opened this issue Aug 25, 2023 · 1 comment

Comments

@msverma101
Copy link

python -m learning.imitation.iil-dagger. issue with this

(gym-duckietown) student_sneha@6g-life-3090:~/Downloads/gym-duckietown$ python -m learning.imitation.iil-dagger.train
DEBUG:commons:version: 6.2.4 *
DEBUG:typing:version: 6.2.3
DEBUG:duckietown_world:duckietown-world version 6.4.3 path /home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages
DEBUG:geometry:PyGeometry-z6 version 2.1.4 path /home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages
DEBUG:aido_schemas:aido-protocols version 6.1.1 path /home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages
DEBUG:nodes:version 6.2.17 path /home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages pyparsing 3.1.1
{'audio': ('directsound', 'openal', 'pulse', 'silent'), 'debug_font': False, 'debug_gl': True, 'debug_gl_trace': False, 'debug_gl_trace_args': False, 'debug_graphics_batch': False, 'debug_lib': False, 'debug_media': False, 'debug_texture': False, 'debug_trace': False, 'debug_trace_args': False, 'debug_trace_depth': 1, 'debug_trace_flush': True, 'debug_win32': False, 'debug_x11': False, 'graphics_vbo': True, 'shadow_window': True, 'vsync': None, 'xsync': True, 'xlib_fullscreen_override_redirect': False, 'darwin_cocoa': True, 'search_local_libs': True}
DEBUG:gym-duckietown:gym-duckietown version 6.1.34 path /home/student_sneha/Downloads/gym-duckietown/src

libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Traceback (most recent call last):
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/student_sneha/Downloads/gym-duckietown/learning/imitation/iil-dagger/train.py", line 2, in
from gym_duckietown.envs import DuckietownEnv
File "/home/student_sneha/Downloads/gym-duckietown/src/gym_duckietown/envs/init.py", line 4, in
from gym_duckietown.envs.duckietown_env import DuckietownEnv
File "/home/student_sneha/Downloads/gym-duckietown/src/gym_duckietown/envs/duckietown_env.py", line 5, in
from ..simulator import Simulator
File "/home/student_sneha/Downloads/gym-duckietown/src/gym_duckietown/simulator.py", line 44, in
from .collision import (
File "/home/student_sneha/Downloads/gym-duckietown/src/gym_duckietown/collision.py", line 6, in
from .graphics import rotate_point
File "/home/student_sneha/Downloads/gym-duckietown/src/gym_duckietown/graphics.py", line 10, in
import pyglet.image
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/image/init.py", line 137, in
from pyglet.gl import *
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/gl/init.py", line 244, in
import pyglet.window
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/window/init.py", line 1880, in
gl._create_shadow_window()
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/gl/init.py", line 220, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/window/xlib/init.py", line 165, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/window/init.py", line 591, in init
context = config.create_context(gl.current_context)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/gl/xlib.py", line 204, in create_context
return XlibContextARB(self, share)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/gl/xlib.py", line 314, in init
super(XlibContext13, self).init(config, share)
File "/home/student_sneha/anaconda3/envs/gym-duckietown/lib/python3.7/site-packages/pyglet/gl/xlib.py", line 218, in init
raise gl.ContextException('Could not create GL context')
pyglet.gl.ContextException: Could not create GL context
(gym-duckietown) student_sneha@6g-life-3090:~/Downloads/gym-duckietown$

@pietroluongo
Copy link

Solved this running on WSL2 by installing libstdcxx-ng on conda environment:

conda install -c conda-forge libstdcxx-ng

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

2 participants