vtk python packages

I have been trying to install python packages for vtk and its modules on windows for several days now and it seems that I am getting something wrong. I install python 3.9 and when i try to install vtk by typing pip install vtk I get an error! But when I install python 3.8 and i download the vtk python wheels it installs it without problem but still whe I try to run a code the vtk modules do not exist. Is like the vtk package does not have any modules in it. What do i do?? What version o python should I install and what to to next?? I am kind of new at this and i really need vtk to do me thesis. thanks in advance

We have not made 3.9 wheels for VTK yet. 3.8 should work though. Are you sure you’re using 64bit Python? We do not provide 32bit wheels.

Thank you very much for replying! yes for 3.8 64bit the package is being installed. But when i download an example from the example page the package does not recognise the module that the example uses

Hmm. Could you paste the code you’re trying and the error message? Does import vtk work? How about from vtkmodules import vtkCommonCore?

Looks like the imports work fine but the vtk.vtkNamedColors() do not work.
and the other modules also as yous see on the right bar the minimized code.

Can you try to import the modules I gave in a REPL and show the error messages there? These error messages are not very helpful (3.9 did improve some of them though; not sure if this is one of them).

importing what you told me before is not giving me any errors.

do i need to build vtk also with the cmake?

If importing is working, something else is going wrong. You’ll need to use some debugging tools to determine what “the path specified” is. Process Monitor should be able to help.

Is there a link that shows all the modules of vtk??

import vtk ends up importing every VTK Python module (which is why the vtkmodules package exists).

Thank you very much. I appreciate it