Trying to get Altair to work with Jupyter Notebook, I installed it using
conda install -c conda-forge altair vega_datasets notebook vega
But when I try to do an example plot
import altair as alt
from vega_datasets import data
# for the notebook only (not for JupyterLab) run this command once per session
alt.renderers.enable('notebook')
iris = data.iris()
alt.Chart(iris).mark_point().encode(
x='petalLength',
y='petalWidth',
color='species'
)
as seen in their quick start guide, I get
ValueError:
To use the 'notebook' renderer, you must install the vega package
and the associated Jupyter extension.
See https://altair-viz.github.io/getting_started/installation.html
for more information.
even though I have installed vega using Conda. I can make vega example plots though. I am unable to enable the Jupyter extension though, as Jupyter says it is incompatible.
Any help is appreciated.