mayavi
mayavi copied to clipboard
Imported VTK version does not match the one used to build the TVTK classes
When building mayavi in a Docker environment (clean venv) I get a notification
WARNING: Imported VTK version (9.2) does not match the one used
to build the TVTK classes (9.4). This may cause problems.
Please rebuild TVTK.
In the end the import fails with some of the VTK objects not present.
As far as I understand it, the pyproject.toml installs the newest vtk on pip:
[build-system]
requires = [
"oldest-supported-numpy",
"setuptools",
"vtk", # <-----
"wheel"
]
But that newest vtk may not be supported in tvtk/vtk_module.py yet
if vtk_version == '9.2.0': ...
if vtk_version.startswith('9.3'): ...
if vtk_version in ['9.4.0', '9.4.1']:...
One solution to this might be to add the highest supported vtk version to pyproject.toml like
"vtk~=9.4.0",
"vtk>=7.4.0,<9.4.0"
Will there be a new release on pip in the near future that supports the latest fixes?
+1 for restricting the highest supported version. While 9.4 works with mayavi 4.8.3 by now, the newest vtk 9.5 leads to issues. I'm trying to exclude this version with https://github.com/enthought/mayavi/pull/1351.