From a8600288254812214190465091f3a1d534f24671 Mon Sep 17 00:00:00 2001 From: "Tim D. Smith" Date: Tue, 17 Jul 2018 07:18:52 -0500 Subject: [PATCH] Use the Agg backend for docs builds (#21914) * 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 --- doc/make.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/make.py b/doc/make.py index 4d54a2415a194..d85747458148d 100755 --- a/doc/make.py +++ b/doc/make.py @@ -363,6 +363,10 @@ def main(): sys.path.append(args.python_path) globals()['pandas'] = importlib.import_module('pandas') + # Set the matplotlib backend to the non-interactive Agg backend for all + # child processes. + os.environ['MPLBACKEND'] = 'module://matplotlib.backends.backend_agg' + builder = DocBuilder(args.num_jobs, not args.no_api, args.single, args.verbosity) getattr(builder, args.command)()