python – Can’t use gridToVtk

I am trying to use the gridToVtk function in anaconda/spyder so I can export and process my results in paraview, but by using the code below:

from evtk.hl import gridToVTK

I got the error message: No module named ‘evtk.hl’
Whilst this could be an installation error, the chances are relatively low to be so as I used the conda install -c conda-forge pyevtk command twice in the conda prompt window.
I also tried by executing the code

from evtk import gridToVTK

but the error message was given as follows: cannot import name ‘gridToVTK’ from ‘evtk’ (C:\Users\ ######\anaconda3\lib\site-packages\evtk_init_.py)

Whilst doing on it python maybe a viable solution, that is not possible the other modules I used for my program are installed via conda.

Read more here: Source link