Skip to content

How to install Vizro

Thanks to PyCafe you can create Vizro dashboards without installing Vizro locally, as you can see from the first dashboard tutorial (you can find out more about working with PyCafe and Vizro from the PyCafe documentation).

If you prefer to work locally, this guide shows you how to install Vizro, how to verify the installation succeeded and find the version of Vizro, and how to update Vizro.

We recommend that you create a virtual environment for each Vizro project you work on to isolate its Python dependencies from other projects. If you already have a virtual environment you can skip the next section and install Vizro. Otherwise, read on!

Prerequisites to working locally

How to create a virtual environment for your Vizro project

The simplest way to create a virtual environment in Python is venv, which is included in the Python standard library. Create a directory for your project and navigate to it. For example:

mkdir vizro-project
cd vizro-project

Next, create and activate a new virtual environment in this directory with venv:

python3 -m venv .venv
source .venv/bin/activate

You might like to use conda as your virtual environment manager. Once installed, you can create and activate a virtual environment from the terminal as follows:

conda create --name vizro-environment
conda activate vizro-environment

Install Vizro

To install Vizro, use pip in your terminal window:

pip install vizro

Confirm a successful installation

To confirm the installation was successful and verify the version of Vizro installed, call the following. You can do this from within a Jupyter Notebook cell, or run the following as a Python script:

import vizro

print(vizro.__version__)

You should see a return output of the form x.y.z.

Upgrade

Check the release notes for any notable breaking changes before migrating an existing project.

To change the version of Vizro installed:

pip install -U vizro