当我尝试使用matplotlib在三维中绘制一组点时,收到以下错误消息:
Traceback (most recent call last):
File "/Users/r8t/summer-2014/diffusion-maps/diffusion1.py", line 55, in <module>
ax = fig.add_subplot(111, projection = '3d')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/figure.py", line 789, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 8457, in __init__
self._axes_class.__init__(self, fig, self.figbox, **kwargs)
File "/Library/Python/2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 91, in __init__
*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py", line 463, in __init__
self.cla()
File "/Library/Python/2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 1040, in cla
self.zaxis._set_scale('linear')
AttributeError: 'ZAxis' object has no attribute '_set_scale'
这似乎表明axes3d.p位于“/Library…”。。。/axes3d.py“,但是自我.cla()位于“/System/…”中
我咨询了python: AttributeError: 'ZAxis' object has no attribute '_set_scale' 评论说有两个图书馆的副本,询问者似乎想知道如何修复它。有人能告诉我怎么修吗?在
我运行的是OSX10.9.3,最近更新了,尽管我不确定这是否相关。在
我试图pip卸载matplotlib,但我认为它只删除了“/Library…”中的文件夹。我也尝试再次安装pip,但后来得到了相同的结果。在
谢谢!!! 鲍比
我认为这是一个this的转储,问题与升级有关。路都乱了。如果你看到你的输出,一行说
上面的一行写着:
^{pr2}$这两个图书馆的文件夹中有一些是错误的。在
我正在开发MacOSX10.9.5。 我试图通过指定工作路径来解决这个问题,但是失败了。在
然后我使用brew重新安装Python,并执行了以下步骤:
brew安装python framework universal
cd/系统/库/框架/Python.framework/版本在
sudo rm电流
sudo ln-s/usr/local/celal/python/2.7.3/Frameworks/Python.framework/Versions/Current在
最后,我成功了。我可以使用matplotlib绘制三维图形。在
非常感谢。在
相关问题 更多 >
编程相关推荐