Python 3 and matplotlib lissue on Linux

隐身守侯 提交于 2020-02-07 03:42:06

问题


I have been facing a couple of issues in using matplotlib with Python 3. After getting rid of this one, I ran into a new one. When I tried to execute the histogram demo, I get this traceback.

Does anyone have an idea? My matplotlib version is: python3-matplotlib-1.2.0-8.fc18.x86_64 (i.e. 1.2 on Fedora 18).

Bugs filed:

  1. Fedora
  2. Matplotlib

回答1:


Add this to the top of the histogram_demo.py, just before import numpy:

from matplotlib import font_manager
font_manager.USE_FONTCONFIG = False

Or modify font_manager.py to change the value permanently.

As far as bug reports go, I'd report the USE_FONTCONFIG = True setting to the Fedora package manager. The subprocess output decoding issue (or regex pattern issue) in Python 3.x should be reported upstream to the matplotlib project.



来源:https://stackoverflow.com/questions/15717119/python-3-and-matplotlib-lissue-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!