VTK python module crashes on import in conda
Hello! For a long while, conda has been a real life-saver in terms of installing VTK. But as of some time now, there seems to be some issue leading VTK behaving incorrectly in conda. Just installing VTK from the default conda channel appears to always lead to a module, which crashes on import. There are reports on the internet like this one: https://discourse.vtk.org/t/no-module-named-vtkcommoncorepython-import-vtk/7039 Also, from users of my package turbulucid, that relies on vtk, see e.g. this issue: https://github.com/timofeymukha/turbulucid/issues/6
I have experienced the same problem, typically a crash in vtkIOParallelPython
, or some other VTK submodule. A workaround seems to be to create an environment, where everything is installed from the conda forge
channel instead of the default one. What makes matters worse, though, is that the issues somehow transcends conda environments, and e.g. accidentally installing a new VTK in a new environment will break the VTK that was working in the forge
environment and the import issue would reappear.
I realize this is not a perfect bug report, and maybe it has more to do with conda than VTK itself. But I would really appreciate if this could be solved, and would try to provide additional information upon request.