Skip to content

Commit 2b39197

Browse files
committed
Matplotlib no longer respects its own config file
1 parent 98bb971 commit 2b39197

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ RUN apt-get -y install libgeos-dev && \
9898
cd cartopy && python setup.py install && \
9999
pip install ibis-framework
100100

101-
# Matplotlib, with backend set to Agg
102-
RUN cd /usr/local/src && git clone https://github.com/matplotlib/matplotlib.git && \
103-
cd matplotlib && mv setup.cfg.template setup.cfg && echo "backend = Agg" >> setup.cfg && \
104-
python setup.py build && python setup.py install
101+
# set backend for matplotlib to Agg
102+
RUN matplotlibrc_path=$(python -c "import site, os, fileinput; packages_dir = site.getsitepackages()[0]; print(os.path.join(packages_dir, 'matplotlib', 'mpl-data', 'matplotlibrc'))") && \
103+
sed -i 's/^backend : Qt4Agg/backend : Agg/' $matplotlibrc_path
105104

106105
# MXNet
107106
# The g++4.8 dependency is not currently available via the default apt-get

0 commit comments

Comments
 (0)