pycharm as ide for vtk python

Hello guys,

I am new at VTK. I managed to set-up PyCharm as IDE for VTK Python development. I wanted to share this info with you in case it is useful and also for some experts in the subject to review if I am missing something.

These are the steps I followed:

Install PyCharm community edition from here:

Create a new project:

With the project creation PyCharm will create a new virtual environment without installing VTK yet.

Create a subfolder with your python souce files. I chose examples as folder name and create a python file

Open in PyCharm editor:

You will see that PyCharm already marks ‘import vtk’ command as an error (as our virtual environment does not have it yet). To fix the issue click the red bulb and click Install package vtk
After vtk has been installed, we can proceed to set-up the debugging environment. In the upper right corner, you will find an Add Configuration button. Click on it:
Click the + button and select Python on the left panel:
Configure your settings (you only need to set-up your python script file):
That’s it, you can start debugging setting break-points:

So I did not performed any of the configuration steps mentioned here and I do think that I do not need to install any python wheel from VTK either as PyCharm will install it when prompted in a virtual environment. Is my understanding correct?



hi Francesc Costa,
Thank you for providing these steps, but I had a Python compilation error while compiling with VS. You can explain how you successfully installed VTK + Python.