Skip to content

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

Merged
tacaswell merged 2 commits into
matplotlib:masterfrom
dstansby:doc-build-reqs
Oct 13, 2017
Merged

If PIL.image is missing, tell user to install pillow#9365
tacaswell merged 2 commits into
matplotlib:masterfrom
dstansby:doc-build-reqs

Conversation

@dstansby

Copy link
Copy Markdown
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.

Comment thread doc/conf.py Outdated
__import__(name)
except ImportError:
missing.append(name)
if name == 'PIL.Image':

@anntzer anntzer Oct 11, 2017

Copy link
Copy Markdown
Contributor

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

jklymak commented Oct 11, 2017

Copy link
Copy Markdown
Member

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

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

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

jklymak commented Oct 12, 2017

Copy link
Copy Markdown
Member

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

@anntzer

anntzer commented Oct 12, 2017

Copy link
Copy Markdown
Contributor

Because names.append("mock").

@dstansby

Copy link
Copy Markdown
Member Author

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

@anntzer

anntzer commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

... 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