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

Skip to content

If PIL.image is missing, tell user to install pillow #9365

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

Merged
merged 2 commits into from
Oct 13, 2017

Conversation

dstansby
Copy link
Member

If pillow isn't installed and one tries to build the docs, currently the error message is

ImportError: The following dependencies are missing to build the documentation: PIL.Image

It took me a while and a bit of searching that to fix this requires installing the pillow package. This PR changes the error message to

ImportError: The following dependencies are missing to build the documentation: pillow

to make it much clearer which package is missing and needs to be installed.

doc/conf.py Outdated
@@ -55,7 +55,10 @@ def _check_deps():
try:
__import__(name)
except ImportError:
missing.append(name)
if name == 'PIL.Image':
Copy link
Contributor

@anntzer anntzer Oct 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just make names a mapping? IPython.blah.blah is likewise technically not the correct name (should be just IPython).

@jklymak
Copy link
Member

jklymak commented Oct 11, 2017

👍 on this. Every six months or so I went through this! conda install PIL, pip install PIL, google google google.... oh, conda install pillow.

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditional on tests passing (but why would they not)

@jklymak
Copy link
Member

jklymak commented Oct 12, 2017

... yet docs-python27 failed for some reason. :-(

@anntzer
Copy link
Contributor

anntzer commented Oct 12, 2017

Because names.append("mock").

@dstansby
Copy link
Member Author

Does that mean the other append statement won't work on python 2 either?

@anntzer
Copy link
Contributor

anntzer commented Oct 13, 2017

... no? missing is a list.

@tacaswell tacaswell merged commit bcf269e into matplotlib:master Oct 13, 2017
@QuLogic QuLogic added this to the 2.2 (next feature release) milestone Oct 13, 2017
@dstansby dstansby deleted the doc-build-reqs branch October 22, 2017 10:47
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
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

Successfully merging this pull request may close these issues.

5 participants