vtkMP4Writer not an attribute for my pip installed vtk

I used pip3.8 to install vtk version 9.2.6 on Linux Rocky 8. I was hoping to use the vtkMP4Writer to export the render data to an external file, but I receive the following error:
AttributeError: module ‘vtk’ has no attribute vtkMP4Writer
I tried avi with similar results. Is there an install parameter required to enable the video writers on a pip install? Do I need a custom build?
Thanks in advance!

Both vtkAVIWriter and vtkMP4Writer are Windows-only.

And the FFmpeg-backed writer is not available in the wheels as our wheels to not come with bundled dependencies. You’ll need a custom-built wheel to use external dependencies.

Thanks for the quick and informative replies! Is there any way to write a video file using Linux? Can I do it by adding the FFmpeg backed writer to my wheel or by installing an additional dependency package?

I believe building a wheel with the VTK::IOFFMPEG module enabled is the easiest way (to use it via the wheel at least).

Thanks to all for the help. It seems the best way is to re-build the wheel. (Why does that sound ironic?)

1 Like