我在 Mac 上安装了 matplotlib,它是成功的。我输入后
import matplotlib.pyplot as plt
在我的代码中,我收到以下错误:
Traceback (most recent call last):
File "q2.py", line 5, in <module>
import matplotlib.pyplot as plt
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/pyplot.py", line 26, in <module>
import matplotlib.colorbar
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/colorbar.py", line 31, in <module>
import matplotlib.artist as martist
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/artist.py", line 10, in <module>
from .transforms import Bbox, IdentityTransform, TransformedBbox, \
File "/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/transforms.py", line 38, in <module>
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/_path.so, 2): Symbol not found: ___emutls_get_address
Referenced from: /usr/local/lib/libstdc++.6.dylib
Expected in: /usr/local/lib/libgcc_s.1.dylib
in /usr/local/lib/libstdc++.6.dylib
我按照以下链接中的安装说明进行操作:
https://github.com/matplotlib/matplotlib/blob/master/README.osx
安装没有问题。有谁知道为什么会发生这种情况?
谢谢!