Linux 禁用OpenGL for Python/Matplotlib

Linux 禁用OpenGL for Python/Matplotlib,linux,opengl,python-3.x,matplotlib,virtualbox,Linux,Opengl,Python 3.x,Matplotlib,Virtualbox,我正在学习一门Python课程,为此我在虚拟机中安装了ArchLinux。当我使用Matplotlib.pyplot来绘制东西(x对y)时,我会得到一系列错误 libGL error: pci id for fd 12: 80ee:beef, driver (null) OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table OpenGL Warning: glVertexArrayRangeNV not found i

我正在学习一门Python课程,为此我在虚拟机中安装了ArchLinux。当我使用Matplotlib.pyplot来绘制东西(x对y)时,我会得到一系列错误

libGL error: pci id for fd 12: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
OpenGL Warning: glVertexArrayRangeNV not found in mesa table
OpenGL Warning: glCombinerInputNV not found in mesa table
OpenGL Warning: glCombinerOutputNV not found in mesa table
OpenGL Warning: glCombinerParameterfNV not found in mesa table
OpenGL Warning: glCombinerParameterfvNV not found in mesa table
OpenGL Warning: glCombinerParameteriNV not found in mesa table
OpenGL Warning: glCombinerParameterivNV not found in mesa table
OpenGL Warning: glFinalCombinerInputNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glDeleteFencesNV not found in mesa table
OpenGL Warning: glFinishFenceNV not found in mesa table
OpenGL Warning: glGenFencesNV not found in mesa table
OpenGL Warning: glGetFenceivNV not found in mesa table
OpenGL Warning: glIsFenceNV not found in mesa table
OpenGL Warning: glSetFenceNV not found in mesa table
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
OpenGL Warning: XGetVisualInfo returned 0 visuals for 00007f6ff33d0240
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: glXGetFBConfigAttrib for 00007f6ff33d0240, failed to get XVisualInfo
当我开始使用虚拟机的3D支持时,它只是要求使用openGL。我的脚本确实创建了一个绘图(空画布),但没有线条

我认为在没有openGL的情况下应该可以画一些线,对吗?如何处理这件事


编辑:我认为这是一个VirtualBox错误,加上Python代码中的一个错误。事实上,我可以得到很好的图表,最后显示错误消息。在最新版本的VirtualBox中,我不再出现错误。Thanx感谢您的建议。

因此,尽管有所有的错误,我从来没有发现任何不起作用的东西,事实上,我没有看到图表并不是因为原始帖子中的错误。我想这与mpl无关,更多的是与VirtualBox中缺乏3D加速有关。

mpl没有(直接)接触openpl。您是否也在使用
vispy
?我的猜测是,这更通用,并且与gui工具包所做的事情相关,而不是特定于mpl。而且,您的虚拟机在与视频卡通信时出现硬件问题。我使用import matplotlib.pyplot作为plt,我认为这与Virtualbox不支持opengl 3这一事实有关。但我一直在想,在python中,我应该能够完全不使用硬件加速。它与
Agg
后端(
matplotlib.use('Agg')
)一起工作吗?我认为这最终是一个virtualbox bug。我再也看不到这个错误了,而且我在自己的Python代码中发现了一个错误,尽管有这个错误,我还是可以得到很好的输出。