Linux 上的 Python 3 和 matplotlib lissue [英] Python 3 and matplotlib lissue on Linux
问题描述
我在 Python 3 中使用 matplotlib 时遇到了几个问题.摆脱了 这个 一个,我遇到了一个新的.当我尝试执行 histogram demo 时,我得到了这个 追溯.
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.
有人有想法吗?我的 matplotlib 版本是:python3-matplotlib-1.2.0-8.fc18.x86_64(即 Fedora 18 上的 1.2).
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).
提交的错误:
推荐答案
将此添加到 histogram_demo.py,就在 import numpy
之前:
Add this to the top of the histogram_demo.py, just before import numpy
:
from matplotlib import font_manager
font_manager.USE_FONTCONFIG = False
或者修改font_manager.py 永久更改该值.
Or modify font_manager.py to change the value permanently.
就错误报告而言,我会向 Fedora 包管理器报告 USE_FONTCONFIG = True
设置.Python 3.x 中的 subprocess
输出解码问题(或正则表达式模式问题)应向上报告给 matplotlib 项目.
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.
这篇关于Linux 上的 Python 3 和 matplotlib lissue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!