Skip to content

Commit a860028

Browse files
tdsmithjreback
authored andcommitted
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
1 parent 4802002 commit a860028

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/make.py

+4
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ def main():
363363
sys.path.append(args.python_path)
364364
globals()['pandas'] = importlib.import_module('pandas')
365365

366+
# Set the matplotlib backend to the non-interactive Agg backend for all
367+
# child processes.
368+
os.environ['MPLBACKEND'] = 'module://matplotlib.backends.backend_agg'
369+
366370
builder = DocBuilder(args.num_jobs, not args.no_api, args.single,
367371
args.verbosity)
368372
getattr(builder, args.command)()

0 commit comments

Comments
 (0)