Installing and Configuring HoloViews

HoloViews and its required dependencies Numpy and Param are pure Python packages, and can thus be installed on any platform that has Python 2.7 or Python3.

That said, HoloViews is designed to work closely with many other libraries, which can make installation and configuration more complicated. This user guide page describes some of these less-common or not-required options that may be helpful for some users.

Other installation options

The main installation instructions should be sufficient for most users, but you may also want the Matplotlib and Plotly backends, which are required for some of the examples:

conda install matplotlib plotly

HoloViews can also be installed using one of these pip commands:

pip install holoviews
pip install 'holoviews[recommended]'
pip install 'holoviews[extras]'
pip install 'holoviews[all]'

The first option installs just the bare library and the Numpy and Param libraries, which is all you need on your system to generate and work with HoloViews objects without visualizing them. The other options install additional libraries that are often useful, with the recommended option being similar to the conda install command above.

Between releases, development snapshots are made available on conda and can be installed using:

conda install -c ioam/label/dev holoviews

To get the very latest development version you can clone our git repository and put it on the Python path:

git clone git://github.com/ioam/holoviews.git
cd holoviews
pip install -e .

Jupyter notebook configuration

In version 5.0 of the Jupyter notebook, limits on data rates were added that unfortunately also prevent image output from showing up in many cases. For now, the most effective fix is to generate a Jupyter config file:

jupyter notebook --generate-config

and then edit the resulting file .jupyter/jupyter_notebook_config.py with code that changes the limit:

c = get_config()
c.NotebookApp.iopub_data_rate_limit=100000000

hv.config settings

The default HoloViews installation will use the latest defaults and options available, which is appropriate for new users. If you want to work with code written for older HoloViews versions, you can use the top-level hv.config object to control various backwards-compatibility options:

  • style_17 : Enables the styling and defaults as found in HoloViews 1.7.
  • warn_options_call : Warn when using the to-be-deprecated __call__ syntax for specifying options, instead of the recommended .opts method.

It is recommended you set warn_options_call to True in your holoviews.rc file (see section below).

It is possible to set the configuration using hv.config directly:

In [1]:
import holoviews as hv
hv.config(style_17=True)
Out[1]:
Config(name='Config00003', style_17=True, warn_options_call=False)

However, because in some cases this configuration needs to be declared before the plotting extensions are imported, the recommended way of setting configuration options is:

In [2]:
hv.extension(config=dict(style_17=True))

Improved tab-completion

Both Layout and Overlay are designed around convenient tab-completion, with the expectation of upper-case names being listed first. In recent versions of Jupyter/IPython there has been a regression whereby the tab-completion is no longer case-sensitive. This can be fixed with:

In [3]:
import holoviews as hv
hv.extension(case_sensitive_completion=True)

The holoviews.rc file

HoloViews supports an rc file that is searched for in the following places: "~/.holoviews.rc" , "~/.config/holoviews/holoviews.rc" and the in parent directory of the top-level __init__.py file (useful for developers working out of the HoloViews git repo). A different location to find the rc file can be specified via the HOLOVIEWSRC environment variable.

This rc file is executed right after HoloViews, imports. For instance you can use an rc file with code like:

import holoviews as hv
hv.config(warn_options_call=True)
hv.extension.case_sensitive_completion=True

to include the various options discussed on this page.