Reputation: 3619
I followed the detailed install instructions for Altair on a jupyter notebook. I'm trying to install this on my virtualenv hosted on pythonanywhere.
However, when I ran the demo script, the chart never appears. This is despite me specifying alt.renderers.enable('notebook')
This is what the notebook looked like:
Not sure what else to try on this -- I believe all the libraries are up to date. My only other thought is that the actual notebook server is running on older python. Not sure if I'm able to update the notebook server here on pythonanywhere (or if that would even help)
The only other wildcard -- is chrome OSX a problem? So I tried this from Safari and got the identical result.
=============
Followup: Looking at the javascript console in the Chrome Developer Tools doesn't show any errors. (I think I'm using the console correctly)
I ran this twice (with kernel restarts) to show that the alt.chart()
does seem to generate something, because when I run w/o the rendering code, it warns me about this.
Upvotes: 0
Views: 680
Reputation: 1913
Unfortunately the PythonAnywhere jupyter notebooks are running on v4.2, and Altair requires v5.3+. It is not something you can change/upgrade on your end, and you will have to wait for a PythonAnywhere system upgrade for the Altair code to run. Sorry!
Upvotes: 0
Reputation: 86463
I suspect your vega jupyter notebook extension is not installed correctly. It should be automatically installed if you have notebook version 5.3 or newer, but it looks like you may have an older version of the notebook package.
To fix this, try running the following:
pip install -U jupyter notebook
pip install -U vega
jupyter nbextension install --sys-prefix --py vega
More information can be found at https://github.com/vega/ipyvega
Upvotes: 1