在使用matplotlib时,出现如下错误:

UserWarning: findfont: Font family ['Times New Roman'] not found. Falling back to DejaVu Sans.
  (prop.get_family(), self.defaultFamily[fontext]))

解决方案:

$ sudo apt install msttcorefonts -qq
$ rm ~/.cache/matplotlib -rf

 

Logo

更多推荐