1
我编译运行雪豹的Mac matplotlib才发现,当我输入matplotlib.pyplot我得到以下错误:如何修复导入错误在matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyplot.py", line 6, in <module>
from matplotlib.figure import Figure, figaspect
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py", line 18, in <module>
from axes import Axes, SubplotBase, subplot_class_factory
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py", line 12, in <module>
import matplotlib.axis as maxis
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axis.py", line 10, in <module>
import matplotlib.font_manager as font_manager
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py", line 52, in <module>
from matplotlib import ft2font
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File
Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/ft2font.so
Expected in: dynamic lookup
我该如何解决这个问题?
我不知道答案,但我在厌倦了处理类似问题后下载了EPD。话虽如此,你使用macports吗?你是否亲自下载和编译? – 2010-06-25 18:52:15
Macports在我试图安装matplotlib时挂起。我从python.org安装了python发行版,然后从源代码编译所有东西。我认为我遇到的一些麻烦与macpython,apple python和macports之间来回切换有关。 – 2daaa 2010-06-25 20:30:25