Question: I'm having some difficulty using Mayavi mlab in python with PyCharm IDE from the MNE-Python environment. I access the Conda environment with Mayavi and VTK over a VNC session using a xvnc server from my local MacOS to a Linux cluster machine. 

The error I get when opening a mlab window is: 

```
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.

```

It seems that using VirtualGL to intercept PyCharm for VTK's call of OpenGL is one possible solution. Have anyone successfully overcome this issue of using Mayavi mlab over VNC session? What are your solutions?

Answer: 
Try again with the latest update (on 1.61.0 as of writing this) — at this point in time, I am getting the output in the integrated terminal, too.

[![enter image description here](https://i.stack.imgur.com/0Itwx.jpg)](https://i.stack.imgur.com/0Itwx.jpg)
I tried to add `-s` to `pytest.ini` or `setting.json` and none of them worked. The only way I was able to make something decent was by creating a [vscode task](https://code.visualstudio.com/docs/editor/tasks#vscode):

Just create a simple json Task and use this simple script to either run all the tests in a file or select the function name and run the other task to run a single pytest:

[![enter image description here](https://i.stack.imgur.com/V0yCM.png)](https://i.stack.imgur.com/V0yCM.png)

```
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "pytest-file",
      "type": "shell",
      "command": "pytest ${file} -s"
    },
    {
      "label": "pytest-test",
      "type": "shell",
      "command": "pytest ${file} -k ${selectedText} -s"
    },
  ]
}

```