PyVista is supported on Python versions 3.5+, with temporary support for Python 2.7 as outlined in this issue.


PyVista is built on top of the Visualization Toolkit (VTK) and NumPy - as such, the following projects are required dependencies of PyVista:

  • vtk - PyVista directly inherits types from the VTK library.

  • numpy - NumPy arrays provide a core foundation for PyVista’s data array access.

  • imageio - This library is used for saving screenshots.

  • appdirs - Data management for our example datasets so users can download tutorials on the fly.


PyVista can be installed from PyPI using pip:

pip install pyvista


To install this package with conda run:

conda install -c conda-forge pyvista

Optional Dependencies

The following are a list of optional dependencies and their purpose:




Using Colormaps


Background plotting


IPython interactive tools


Interactive notebook rendering


Capturing PyVista output for docs

Source / Developers

Alternatively, you can install the latest version from GitHub by visiting PyVista, downloading the source (or cloning), and running:

git clone
cd pyvista
python -m pip install -e .

Test Installation

You can test your installation by running an example:

from pyvista import examples

See other examples:

from pyvista import examples

# list all examples


A more comprehensive testing suite is available after cloning the source repository. For details on how to clone and test the PyVista source, please see our Contributing Guide and specifically, the Testing section.

Running on CI Services

Please head over to pyvista/gl-ci-hepers for details on setting up CI services like Travis and AppVeyor to run PyVista.

Running on MyBinder

This section is for advanced users that would like to install and use PyVista with headless displays on notebook hosting services like MyBinder.

Please see this project for a convenient Cookiecutter to get started using PyVista on the notebook hosting service MyBinder.

To get started, the Docker container will need to have libgl1-mesa-dev and xvfb installed through apt-get. For MyBinder, include the following in a file called apt.txt:


Then, you need to configure the headless display, for MyBinder, create a file called start and include the following set up script that will run every time your Docker container is launched:

set -x
export DISPLAY=:99.0
which Xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
set +x
exec "$@"

And that’s it! Include PyVista in your Python requirements and get to visualizing your data! If you need more help than this on setting up PyVista for these types of services, hop on Slack and chat with the developers or take a look at this repository that is currently using PyVista on MyBinder.

Running on Remote Servers

Using PyVista on remote servers requires similar setup steps as in the above Docker case. As an example, here are the complete steps to use PyVista on AWS EC2 Ubuntu 18.04 LTS (ami-0a313d6098716f372 in us-east-1). Other servers would work similarly.

After logging into the remote server, install Miniconda and related packages:

wget -O
bash -b -p miniconda
echo '. $HOME/miniconda/etc/profile.d/' >> ~/.bashrc && source ~/.bashrc
conda create --name vtk_env python=3.7
conda activate vtk_env
conda install nodejs  # required when importing pyvista in Jupyter
pip install jupyter pyvista panel

# To avoid "ModuleNotFoundError: No module named 'vtkOpenGLKitPython' " when importing vtk
sudo apt update && sudo apt install python-qt4 libgl1-mesa-glx

Then, configure the headless display:

sudo apt-get install xvfb
export DISPLAY=:99.0
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3

Reconnect to the server with port-forwarding, and start Jupyter:

ssh -i "your-ssh-key" your-user-name@your-server-ip -L 8888:localhost:8888
conda activate vtk_env
jupyter notebook --NotebookApp.token='' --no-browser --port=8888

Visit localhost:8888 in the web browser.