Initialization failed for vtkWebCore, not compatible with vtkmodules.vtkCommonCore

When vtk is installed from pip, I see the following error:
And run:
import vtk
I see the following error:

Initialization failed for vtkWebCore, not compatible with vtkmodules.vtkCommonCore

I am not sure how can I debug this further.

Has anyone seen it before? Any debugging hints would be useful.

Can you provide more background information?

  • OS
  • Python version (+origin: system, conda, venv…)
  • VTK version
  • Anything that might be specific to your setup

Hi Sebastien!
OS: Ubuntu 22.04
vtk==9.3.0
Python 3.10 venv, pantsbuild
I currently believe that the issue is with another library that we install: cadquery.

Feel free to close if this seems unrelated to VTK installation itself.

Thanks for pointing out the origin of the issue. That is very helpful.