我在 python 中使用 Mayavi mlab 和 MNE-Python 环境中的 PyCharm IDE 时遇到了一些困难。我使用 xvnc 服务器从本地 MacOS 到 Linux 集群机器,通过 VNC 会话访问带有 Mayavi 和 VTK 的 Conda 环境。
打开 mlab 窗口时出现的错误是:
ERROR: In ../Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 754
vtkXOpenGLRenderWindow (0x556e13b32670): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
似乎使用 VirtualGL 来拦截 PyCharm 以实现 VTK 对 OpenGL 的调用是一种可能的解决方案。有没有人成功克服了在 VNC 会话上使用 Mayavi mlab 的问题?你的解决方案是什么?