The following worked for me

matplotlib.pyplot.rc('font', family='STIXGeneral')