📅  最后修改于: 2022-03-11 14:46:42.104000             🧑  作者: Mango
#Assuming you working on conda:
conda install -c conda-forge mscorefonts
#Then detete the cache as follows:
rm ~/.cache/matplotlib -rf
#Use the following as fit:
import matplotlib
myfonts = "Times New Roman"
matplotlib.rcParams['font.family'] = "sans-serif"
matplotlib.rcParams['font.sans-serif'] = myfonts