0

I am trying to install mayavi package on my windows, but it still gives me this error: ModuleNotFoundError: No module named 'vtk'

I think I have installed vtk successfully but this error makes me doubt. How can I make sure that VTK is installed and works correctly?

To explained what I did on my system:

  1. I have cloned a python code which is a bunch of py files. so I cant use jupyter.
  2. I installed python 3.10.1.
  3. I tried IDLE, I used "pip install mayavi" command. I found out in guidlines taht the error is about packages that mayavi is dependent on them. in this case VTK and py3qt. py3qt has been installed successfullt but VTK was not easy.
  4. I tried 2 tutorial in youtube: https://www.youtube.com/watch?v=IgvbhyDh8r0&t=222s https://www.youtube.com/watch?v=6S3_sl5Sc0E the second one worked on my system but still I have that VTK error.

Unfortunately, I am a beginner in python. do you know a clear easy tutorial on mayavi installation? They have told me that anaconda makes it easier but even " conda install -c anaconda mayavi " didn't work for me.

  • What kind of setup do you have? One/multiple python versions, how installed. What did you do to install `mayavi` and how are you running the import statement: From the command line, by executing a script with `python ` or through a jupyter notebook? There are many points along the line where stuff can go wrong. – FlyingTeller Dec 15 '21 at 09:39
  • Thanks for your reply @FlyingTeller: I understand that many things can lead to this error. That's why I want to check VTK installation in another way if possible. I have edited my question to add some more details. – Forough Nasihati Dec 15 '21 at 14:04
  • @FlyingTeller Is it something about the version of vtk, python and anaconda that I have installed? do you which versions are consistent together? – Forough Nasihati Dec 15 '21 at 14:10

0 Answers0