Altair can be installed via pip with the following:
$ pip install altair $ pip install --upgrade notebook
In addition, to render Altair visualizations in the classic Jupyter Notebook, you will need to enable the ipyvega nbextension:
$ jupyter nbextension enable --sys-prefix --py vega
This single step is not needed for usage with JupyterLab and nteract, which have built-in support for Vega-Lite.
If you use conda to install Altair:
$ conda install altair --channel conda-forge
the nbextension is automatically enabled.
Altair has the following dependencies, all of which are installed by default with either of the above installation commands:
The Altair source repository is available on GitHub. Once you have cloned the repository and installed all the above dependencies, run the following command from the root of the repository to install the master version of Altair:
$ pip install -e .
If you do not wish to clone the source repository, you can install the development version directly from GitHub using:
$ pip install git+https://github.com/altair-viz/altair