-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that holoviews imports without any plotting backend #528
Comments
It is worth pointing out that I believe what is happening is that it is expecting a renderer to exist when none has be defined (no plotting backends available). I've not looked at the code just yet but I think you meant 'at least one backend to be loaded'...unless we've hardcoded matplotlib as the default backend. In that case, the default backend should work by ordering where the first backend in the renderers list is the default. |
That's one issue but there's more, after resolving that issue I ran into at least two more issues:
|
Really our ipython extension really means the ipython notebook extension which is why we can assume jinja2 and nbformat. The pyparsing issue we've known about and I do think it is safe to say that most users will have matplotlib (and can easily install pyparsing installed otherwise). In conclusion, I think those other imports are ok (nbformat and pyparsing) and the main problem is it should be possible to skip matplotlib as long as you are happy to install pyparsing to get the magics working. |
No, the IPython extension gets loaded as long as you have IPython installed, either we only import it when all the notebook dependencies are available or we make sure that it imports even without those dependencies, which is what I did in #529. |
The approach in #529 is good but what what we could have done is simply try to import notebook and not IPython as that would automatically ensure the dependencies are satisfied (except for pyparsing). |
HoloViews now avoids importing the plotting backends until they are requested by the notebook extension. Closing. |
As the title says, HoloViews used to require only a minimal set of packages to import. This is now broken because the
__init__.py
attempts to import ipython, which in turn requires at least the matplotlib backend to be loaded. We should ensure this either fails gracefully or get rid of this requirement entirely. Additionally we should also ensure that each backend works independently from all the others, allowing bokeh to be used without matplotlib being installed.The text was updated successfully, but these errors were encountered: