Skip to content

Default docs builds to a non-interactive matplotlib backend #21913

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
tdsmith opened this issue Jul 14, 2018 · 0 comments
Closed

Default docs builds to a non-interactive matplotlib backend #21913

tdsmith opened this issue Jul 14, 2018 · 0 comments
Labels
Milestone

Comments

@tdsmith
Copy link
Contributor

tdsmith commented Jul 14, 2018

python make.py html fails on Mac OS in a virtualenv, using a Python interpreter installed with pyenv, because the interpreter isn't a framework build, and matplotlib defaults to using the macosx interactive backend, which requires a framework build of the interpreter.

I think the docs build doesn't require an interactive backend and it should be safe to use Agg, which is available on all platforms.

The failure looks like:

(pandas-dev) tsmith-0yhv2t:tsmith doc (master *)$ python make.py html
Running Sphinx v1.7.5

Configuration error:
There is a programable error in your configuration file:

Traceback (most recent call last):
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/site-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "conf.py", line 285, in <module>
    klass = getattr(importlib.import_module(mod), classname)
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/tsmith/upstream/pandas/pandas/io/formats/style.py", line 34, in <module>
    import matplotlib.pyplot as plt
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/Users/tsmith/.pyenv/versions/3.6.4/envs/pandas-dev/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 17, in <module>
    from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
tdsmith added a commit to tdsmith/pandas that referenced this issue Jul 14, 2018
This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments.

Closes pandas-dev#21913.
@jschendel jschendel added the Docs label Jul 15, 2018
@jreback jreback added this to the 0.24.0 milestone Jul 16, 2018
jreback pushed a commit that referenced this issue Jul 17, 2018
* Use the Agg backend for docs builds

This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments.

Closes #21913.

* Modify make.py instead of adding a matplotlibrc
aeltanawy pushed a commit to aeltanawy/pandas that referenced this issue Jul 20, 2018
* Use the Agg backend for docs builds

This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments.

Closes pandas-dev#21913.

* Modify make.py instead of adding a matplotlibrc
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this issue Oct 1, 2018
* Use the Agg backend for docs builds

This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments.

Closes pandas-dev#21913.

* Modify make.py instead of adding a matplotlibrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants