Repository: holoviz/holoviews

Issue:
Dependencies missing
Hi,

I think that the holoviews pip package does not correctly state its dependencies. These are packages that holoviews complained about not finding when I tried importing it:
- jinja2 
- nbformat 
- nbconvert 
- matplotlib

After installing them manually via pip, I can import holoviews fine.



Discussion:
Thanks for reporting this!

I guess you tried the obvious thing with `pip install holoviews`. This only installs the minimal dependencies as holoviews can be used as a component of other libraries. The thing you probably wanted was `pip install holoviews[extras]`.

This is described on our [install page](http://holoviews.org/install.html) but as you tried  the most obvious thing, I think we ought to update the homepage to make it clear this is the recommended approach. 

Ideally `pip install holoviews` would be the recommended default and something like `pip install holoviews[core]` would pull in the minimal dependencies. Unfortunately, I don't think it is easy to configure `setup.py` to work that way!

Oh.. yeah, in fact I don't think I read the install page at all. I guess I just expect 'pip install <whatever>' to do what I want.

How about making setup.py print a big warning if someone installs holoviews? Something along the lines of "please read the install page and make sure it wasn't holoviews[extras] you wanted to install"?

That's a really good suggestion. Thanks!

I think users have every right to expect that `pip install` and `conda install` do what at least most people will want, but unfortunately that's not the case right now.  :-(  

I've asked strongly for such a capability for conda at least:  https://github.com/conda/conda/issues/1696
Simply put, I think the default option for any installer should install the basic set of packages that the developers think most people would need, and users can then explicitly request fewer (for a minimal installation) or more (for all conceivably related packages) packages if they want. 

Conda doesn't currently support that (or any other optional dependencies), and as far as I can tell, pip/setuptools only allow _adding_ packages to the default installation, not removing them.  Either way, there's a major tension between the goal of having things work "out of the box" for most users, and the goal of allowing a minimal installation for the users who wish to have it; at the moment one can't properly support both! :-(


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@
 
 # Notebook dependencies of IPython 3
 extras_require['notebook-dependencies'] = ['ipython', 'pyzmq', 'jinja2', 'tornado',
-                                           'jsonschema',  'ipython', 'pygments']
+                                           'jsonschema',  'notebook', 'pygments']
 # IPython Notebook + matplotlib + Lancet
 extras_require['recommended'] = (extras_require['notebook-dependencies']
                                  + ['matplotlib', 'lancet-ioam'])
@@ -101,4 +101,22 @@ def check_pseudo_package(path):
             import holoviews
             holoviews.__version__.verify(setup_args['version'])
 
+
+    if 'install' in sys.argv:
+        header = "HOLOVIEWS INSTALLATION INFORMATION"
+        bars = "="*len(header)
+
+        extras = '\n'.join('holoviews[%s]' % e for e in setup_args['extras_require'])
+
+        print("%s\n%s\n%s" % (bars, header, bars))
+
+        print("\nHoloViews supports the following installation types:\n")
+        print("%s\n" % extras)
+        print("Users should consider using one of these options.\n")
+        print("By default only a core installation is performed and ")
+        print("only the minimal set of dependencies are fetched.\n\n")
+        print("For more information please visit http://holoviews.org/install.html\n")
+        print(bars+'\n')
+
+
     setup(**setup_args)


Test patch: