Cross incompatibility with altair and nteract vs classic notebook
See original GitHub issueAltair does not work in the classic Jupyter Notebook after successfully using it in an nteract web notebook.
Altair works in nteract without a user needing to run alt.renderers.enable('notebook')
. e.g. this notebook works https://github.com/nteract/nteract/blob/master/applications/desktop/example-notebooks/altair.ipynb when launched with jupyter nteract
.
When using Altair without nteract, a user must run alt.renderers.enable('notebook')
. However, this returns the below error. As per the Altair troubleshooting guide, Altair believes Vega is not installed. Even upon verifying successful Altair + Vega installation (as per the installation guide ), the error persists. conda list
verified Vega is installed. I am using Jupyter Notebook 5.6.0.
Do you know what may be causing this? cc @rgbkrk
---------------------------------------------------------------------------
NoSuchEntryPoint Traceback (most recent call last)
~/anaconda3/lib/python3.6/site-packages/altair/utils/plugin_registry.py in _enable(self, name, **options)
133 try:
--> 134 ep = entrypoints.get_single(self.entry_point_group, name)
135 except entrypoints.NoSuchEntryPoint:
~/anaconda3/lib/python3.6/site-packages/entrypoints.py in get_single(group, name, path)
185
--> 186 raise NoSuchEntryPoint(group, name)
187
NoSuchEntryPoint: No 'notebook' entry point found in group 'altair.vegalite.v2.renderer'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-4-025c0cf17452> in <module>()
----> 1 alt.renderers.enable('notebook')
~/anaconda3/lib/python3.6/site-packages/altair/utils/plugin_registry.py in enable(self, name, **options)
169 if name is None:
170 name = self.active
--> 171 return PluginEnabler(self, name, **options)
172
173
~/anaconda3/lib/python3.6/site-packages/altair/utils/plugin_registry.py in __init__(self, registry, name, **options)
23 self.options = options
24 self.original_state = registry._get_state()
---> 25 self.registry._enable(name, **options)
26
27 def __enter__(self):
~/anaconda3/lib/python3.6/site-packages/altair/utils/plugin_registry.py in _enable(self, name, **options)
135 except entrypoints.NoSuchEntryPoint:
136 if name in self.entrypoint_err_messages:
--> 137 raise ValueError(self.entrypoint_err_messages[name])
138 else:
139 raise
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top GitHub Comments
You need to
pip install vega==1.3
. vega version 2.0 does not work with the current release of Altair. See #1114No, the PNG is rendered at the time the plot is displayed. You can see the source here: https://github.com/vega/ipyvega/blob/master/src/index.ts#L22-L35