diff --git a/doc/conf.py b/doc/conf.py index 987142628704..51a8c58249cd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -41,26 +41,27 @@ def _check_deps(): - names = ["colorspacious", - "IPython.sphinxext.ipython_console_highlighting", - "matplotlib", - "numpydoc", - "PIL.Image", - "scipy", - "sphinx_gallery"] + names = {"colorspacious": 'colorspacious', + "IPython.sphinxext.ipython_console_highlighting": 'ipython', + "matplotlib": 'matplotlib', + "numpydoc": 'numpydoc', + "PIL.Image": 'pillow', + "scipy": 'scipy', + "sphinx_gallery": 'sphinx_gallery'} if sys.version_info < (3, 3): - names.append("mock") + names["mock"] = 'mock' missing = [] for name in names: try: __import__(name) except ImportError: - missing.append(name) + missing.append(names[name]) if missing: raise ImportError( "The following dependencies are missing to build the " "documentation: {}".format(", ".join(missing))) + _check_deps() import matplotlib