Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add pillow and graphviz to doc build dependencies #7793

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

Closed
dstansby opened this issue Jan 10, 2017 · 13 comments
Closed

Add pillow and graphviz to doc build dependencies #7793

dstansby opened this issue Jan 10, 2017 · 13 comments
Milestone

Comments

@dstansby
Copy link
Member

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.

@tacaswell
Copy link
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.

@dstansby
Copy link
Member Author

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.

@dstansby
Copy link
Member Author

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.

@NelleV
Copy link
Member

NelleV commented Jan 14, 2017

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

@dstansby
Copy link
Member Author

dstansby commented Feb 3, 2017

Pretty sure this is fixed now.

@dstansby dstansby closed this as completed Feb 3, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Feb 4, 2017
@dstansby dstansby reopened this Feb 11, 2017
@dstansby
Copy link
Member Author

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.

@dstansby dstansby changed the title Add pillow to doc build dependencies Add pillow and graphviz to doc build dependencies Feb 11, 2017
@dopplershift
Copy link
Contributor

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

@NelleV
Copy link
Member

NelleV commented Feb 11, 2017

graphvis is not pip installable.

@afvincent
Copy link
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 :/.

@afvincent
Copy link
Contributor

afvincent commented Feb 12, 2017

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.

@dstansby
Copy link
Member Author

dstansby commented Feb 13, 2017

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?

@tacaswell
Copy link
Member

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

@story645
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants