Skip to content

Add pillow and graphviz to doc build dependencies #7793

Closed

Description

@dstansby

Just spent about 5 mins building the docs, only to get:

Warning, treated as error:
/Users/dstansby/matplotlib/doc/examples/pylab_examples/agg_buffer.rst:8: WARNING: Exception occurred in plotting agg_buffer
 from /Users/dstansby/matplotlib/doc/mpl_examples/pylab_examples/agg_buffer.py:
Traceback (most recent call last):
  File "<string>", line 13, in <module>
ImportError: No module named 'PIL'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/dstansby/matplotlib/lib/matplotlib/sphinxext/plot_directive.py", line 525, in run_code
    six.exec_(code, ns)
  File "<string>", line 15, in <module>
SystemExit: Pillow must be installed to run this example

Building HTML failed.

Would be good to have pillow checked before the build starts like the other dependencies.

Activity

  1. tacaswell commented on Jan 10, 2017

    @tacaswell
    Member

    There is https://github.com/matplotlib/matplotlib/blob/master/doc-requirements.txt which has this. I guess the docs have gotten out of date?

    Should have the instruction to pip install -r ../doc-requirements.txt someplace.

  2. dstansby commented on Jan 10, 2017

    @dstansby
    MemberAuthor

    Also looks like the docs need graphviz to build too.

    writing output... [ 58%] api/animation_api                                                                                                                                                                      
    Warning, treated as error:
    WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting
    
    Building HTML failed.
    
  3. dstansby commented on Jan 10, 2017

    @dstansby
    MemberAuthor

    Huh, odd, it definitely checked for numpydoc, ipython, and colorspacious when I started trying to build (and force stopped the build at the beginning), but not pillow or graphviz.

  4. NelleV commented on Jan 14, 2017

    @NelleV
    Member

    My bad… I forgot a couple of dependencies when I added the checks early on in the documentation build.
    I'll fix that.

  5. dstansby commented on Feb 3, 2017

    @dstansby
    MemberAuthor

    Pretty sure this is fixed now.

  6. added this to the milestone on Feb 4, 2017
  7. dstansby commented on Feb 11, 2017

    @dstansby
    MemberAuthor

    At least on OSX, graphviz is needed to build the docs, should this be added to the requirements?

    reading sources... [100%] users/whats_new                                                                                                                
    generating thumbnails... [100%] build/plot_directive/mpl_examples/pylab_examples/xcorr_demo.png                                                          
    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    writing output... [ 58%] api/animation_api                                                                                                               
    Warning, treated as error:
    WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting
    
    Building HTML failed.
    
  8. changed the title [-]Add pillow to doc build dependencies[/-] [+]Add pillow and graphviz to doc build dependencies[/+] on Feb 11, 2017
  9. dopplershift commented on Feb 11, 2017

    @dopplershift
    Contributor

    I didn't think graphviz was pip-installable. Is the requirement documented somewhere?

  10. NelleV commented on Feb 11, 2017

    @NelleV
    Member

    graphvis is not pip installable.

  11. afvincent commented on Feb 12, 2017

    @afvincent
    Contributor

    I can confirm that graphviz also seems to be required for building the docs on a GNU/Linux system (at least on Arch). I just got a nice build failure (the same as @dstansby ) after 10 min :/.

  12. afvincent commented on Feb 12, 2017

    @afvincent
    Contributor

    Huh, how isn't graphviz pip-installable? I just genuinely tried pip install graphviz and I was returned a kind Successfully installed graphviz-0.5.2 :). Let's see if the doc now builds. Edit: Nevermind, I did not notice that the “graphviz” from pip is simply some kind of wrapper… Sorry for the noise.

    For the record, I had run pip install -r ../doc-requirements.txt before getting the error about graphviz.

  13. dstansby commented on Feb 13, 2017

    @dstansby
    MemberAuthor

    https://pypi.python.org/pypi/graphviz/0.5.2

    To render the generated DOT source code, you also need to install Graphviz

    so I guess there's no harm in adding this to doc-requirements.txt. Is there a way to test for graphviz before running the whole doc build though?

  14. tacaswell commented on Feb 14, 2017

    @tacaswell
    Member

    which dot will check if the underlying binary is installed or not.

  15. story645 commented on Apr 30, 2017

    @story645
    Member

    Closed in #8544 if not before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions