在stackoverflow中找到了终极解决办法:

>>> import matplotlib
>>> matplotlib.matplotlib_fname()
# This is the file location in Ubuntu
'/etc/matplotlibrc'

找到matplotlibrc之后,将backend从tkAGG修改为AGG

 

http://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined

相关文章:

  • 2021-05-03
  • 2022-12-23
  • 2021-10-21
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案