question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cross incompatibility with altair and nteract vs classic notebook

See original GitHub issue

Altair 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jakevdpcommented, Aug 25, 2018

You need to pip install vega==1.3. vega version 2.0 does not work with the current release of Altair. See #1114

1reaction
jakevdpcommented, Aug 26, 2018

When the plots are interactive, do you store the changed result?

No, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Book — UBC JupyterDays 2020 - GitHub Pages
Write publication-quality content including figures, math, citations & cross-references! Write content as Jupyter Notebooks, markdown, or reStructuredText.
Read more >
Insights into the molecular control of cross-incompatibility in ...
Gametophytic cross-incompatibility systems in corn have been the subject of genetic studies for more than a century.
Read more >
pyFBS Documentation
pyFBS is a Python package for Frequency Based Substructuring, Transfer Path Analysis and also, as a new addition,.
Read more >
Installed Python Libraries - CoCalc
Library Python 3 SageMath Anaconda 2020 Anaco... abelfunctions 0.1.0 access. Calculate spatial accessibility metrics. 1.1.8 1.1.8 1.1.3 1.1.3 admcycles. Tautological ring on Mbar_g,n 1.3.2
Read more >
Interactive Systems for Scalable Visualization and Analysis
Considering both the backend and frontend concerns, we present Falcon, an interactive cross lter application where users can interact with billions of records ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found