Closed moorepants closed 4 months ago
Not 100% sure the right thing to do. VTK is now built against qt6-main, so you have to use it with PySide6 not PyQt (which is only available as PyQt5 at the moment). So personally I would conda install mayavi=*=pyside6_* vtk=*=qt*
or so. But if you want you could get a PyQt5 variant with an older version of VTK as well if you wanted.
vtk is a run dependency of mayavi in this feedstock, so I would expect installing mayavi (without any qualifiers) would work. It is also quite odd that conda install mayavi
and conda install mayavi vtk
result in different packages being installed for vtk, which is a dependency of mayavi.
But if you want you could get a PyQt5 variant with an older version of VTK as well if you wanted.
Doesn't' this then imply we need upper bounds on the vtk dependency in mayavi if pyqt5 is installed instead of pyside6?
It is also quite odd that conda install mayavi and conda install mayavi vtk result in different packages being installed for vtk, which is a dependency of mayavi.
Agreed, this is arguably / maybe a conda
solver bug, not sure why it would matter. Maybe because we depend on vtk-base
rather than vtk
, not sure.
Doesn't' this then imply we need upper bounds on the vtk dependency in mayavi if pyqt5 is installed instead of pyside6?
Depends on if you use the Qt parts of VTK or not. It's not likely that you do actually -- most people using Mayavi use its (python-based) vtk render window interactor rather than any Qt functionality actually provided by VTK itself.
The real reason you need the Qt version of VTK isn't for the Qt-based functionality -- it's because if you don't install that version you get the osmesa
variant, which renders using offscreen MESA (hence the name).
So it is tempting to require vtk=*=qt
or similar. I don't think you have to use mayavi with Qt -- you could use it with osmesa
for example and set up a pipeline do some rendering and return. But it is a much more common use case to do it. So maybe the thing to do is have the pyqt and pyside variants require vtk=*=qt*
versions of vtk, but then have an additional variant that just depends on vtk-base
(and requires no Qt framework at all).
Complex! I'm not so familiar with the inner workings of mayavi. I also use the vtk rendering in my app outside of the qt gui, so maybe I am also using the non-gui toolkit rendering too!
Solution to issue cannot be found in the documentation.
Issue
I have a mayavi based app. If I do:
and then run the
yeadon
command in that environment, the vtk based figure does not display:Here are the vtk and qt related packages in the environment:
but if I do:
the app works as expected:
It seems to be because a different vtk is installed:
I'm not quite sure why different versions are installed with and without including vtk explicitly.
Installed packages
Environment info