Home » How to Install VTK on Your Laptop

Installing VTK on your own computer

We highly recommend that you install Python and VTK on your own computer, since this will make it easier for you to work with the assignments/project and practice VTK and Python programming on your own. Some directions on how to install VTK on different platforms follow here:

Linux

Via the package manager (recommended)

VTK can be found in the package repository on most Linux distributions, making the installation process quick and painless. For instance, on Ubuntu 12.04 you can install VTK 5.8 and the Python wrapper by typing

  sudo apt-get install libvtk5-dev python-vtk

in your favorite shell.

Via a scientific Python distribution

You can install VTK and Python via the Python distributions Enthought Canopy/EPD or Anaconda. See the corresponding Windows section for more information.

Building from source

Fairly easy, you just need GCC, CMake, Python, + some extra dependencies. Instructions for how to build and install VTK (with the Python wrapper) locally on RHEL 6 can be found here.

Windows

Via a scientific Python distribution (recommended)

Install VTK and Python via one of the following Python distributions:

  • Enthought Canopy or EPD. You can apply for a free academic license here.
  • Anaconda. Instructions for how to install Anaconda on different platforms can be found here. VTK is not included among the standard packages, but can be obtained as an additional package from the conda package repository and then be installed as described here.
  • pythonxy (Warning! will override existing Python installations)

Building from source

Don’t bother (unless you have plenty of time to spare and know what you are doing). It takes 30+ minutes to just compile the library (for some reason VTK is much slower to compile on Windows than on Linux or Mac), and afterwards you might find that you forgot to set some crucial option in the CMake build script for, e.g., the Python wrapper, so you have to start over again… If you want to give it a try anyway, a quick Google search on “building VTK on Windows” should provide instructions to get you started.

Mac

Via a scientific Python distribution (recommended)

You can install VTK and Python via Enthought Canopy/EPD or Anaconda. See the corresponding Windows section for more information. Previously, VTK was not included in the 64-bit Mac version of EPD (might have changed), so you might have to use the 32-bit version.

Building from source

Follow the instructions here. Consult Google or Anders (our only Mac user) if you run into trouble.