The backend setting is the first configuration option in this file. Change it from TkAgg to Agg,
or to some other backend you have installed on your system. The comments in the matplotlibrc file list all backends supported by matplotlib.
The backend specified in this file is only the default; you can still change it at runtime by adding the following two lines, before
any other matplotlib import:
matplotlib.use("Agg")# or whichever backend you wish to use