Error importing vtk python module: a clean solution

Well, after compiling your VTK (with Python support) on a Debian (or Archlinux), you could receive an error similar to this form python interpeter if you import vtk module:

ImportError: libvtkCommonPythonD.so.5.7: cannot open shared object file: No such file or directory

This occurs because VTK installer puts all shared libraries in a subdirectory of /usr/local/lib Solve it by creating a file called vtk.conf in /etc/ld.so.conf.d/ directory. In this file, put the path to VTK libs, for example: /usr/local/lib/vtk-5.7/

And so, launch (as root) the command ldconfig to update the shared library path cache.

This is a clean way to solve the problem: avoid symbolic links, copy/paste files or setting mess-oriented enviroment variable as PYTHONPATH and LD_LIBRARY_PATH, please!