在我的 Fedora19 上成功安装 matplotlib 后,我测试了我用 python 编写的代码。不幸的是,我得到了这个 ImportError 。
$ python ren.py
Traceback (most recent call last):
File "ren.py", line 10, in <module>
import matplotlib.pyplot as plt
File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 26, in <module>
from matplotlib.figure import Figure, figaspect
File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 32, in <module>
from matplotlib.image import FigureImage
File "/usr/lib64/python2.7/site-packages/matplotlib/image.py", line 22, in <module>
import matplotlib._png as _png
ImportError: libpng16.so.16: cannot open shared object file: No such file or directory
我找到了文件“libpng16.so.16”并将其复制到 /usr/lib。但是什么也没发生。任何帮助将不胜感激。