【发布时间】:2015-04-23 03:06:41
【问题描述】:
从open suse下的python shell
Linux2 上的 Python 2.7.5(默认,2013 年 5 月 30 日,16:55:57)[GCC] 输入“help”、“copyright”、“credits”或“license”了解更多信息。
import matplotlib.pyplot as plt
返回以下内容。任何帮助表示赞赏。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 24, in <module>
import matplotlib.colorbar
File "/usr/lib64/python2.7/site-packages/matplotlib/colorbar.py", line 29, in <module>
import matplotlib.collections as collections
File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 23, in <module>
import matplotlib.backend_bases as backend_bases
File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 50, in <module>
import matplotlib.textpath as textpath
File "/usr/lib64/python2.7/site-packages/matplotlib/textpath.py", line 11, in <module>
import matplotlib.font_manager as font_manager
File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1356, in <module>
_rebuild()
File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1341, in _rebuild
fontManager = FontManager()
File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1004, in __init__
self.ttflist = createFontList(self.ttffiles)
File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 584, in createFontList
prop = ttfFontProperty(font)
File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 398, in ttfFontProperty
sfnt4 = sfnt4.decode('ascii').lower()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 7: ordinal not in range(128)
【问题讨论】:
标签: python python-2.7 matplotlib