pip install modernglapt install xorgproto, after which it installed correctly moderngl.create_context(standalone=True) which complained about lack of libGL.so, which I also fixed with apt install mesaenv DISPLAY:=1 instead of env DISPLAY=:1DISPLAY=:1 prefix