Note: These instructions also likely work for other Blender and VTK versions, but the versions applied below are the ones tested for BVTKNodes.
Run CMD.EXE as administrator and run commands
cd C:\Program Files\Blender Foundation\Blender\2.93\python\bin
python.exe -m ensurepip
python.exe -m pip install vtk==9.1.0
or if you need to install newest (possibly unsupported) version of vtk, replace last command with
python.exe -m pip install vtk
Run on normal terminal commands
cd /path/to/blender-2.93/2.93/python/bin
./python3.7m -m ensurepip
./python3.7m -m pip install vtk==9.1.0
or if you need to install newest (possibly unsupported) version of vtk, replace last command with
./python3.7m -m pip install vtk
You can test if VTK is found in Blender Python Console (by default located in the Scripting workspace ) with commands
import vtk
vtk.vtkVersion().GetVTKVersion()
which should return VTK version number that was installed.
Blender 2.93 and newer has an issue on Linux, where running import vtk
command in Blender Python Console raises error
ImportError: /path/to/blender/2.93/python/lib/python3.9/site-packages/vtkmodules/libvtkPythonInterpreter-9.0.so: undefined symbol: Py_Main
Workaround for this issue is to edit file
/path/to/blender/2.93/python/lib/python3.9/site-packages/vtkmodules/all.py
and disable import of vtkRenderingMatplotlib
by commenting out the line like so:
# from .vtkRenderingMatplotlib import *