“ PathCollection”对象没有属性“ do_3d_projection”

时间:2018-09-30 16:55:48

标签: python matplotlib apache-zeppelin

我无法从Zeppelin的python中的以下代码获得输出:

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = Axes3D(fig)

x = list(range(0, 100))
y = list(range(0, 100))
z = list(range(0, 100))

ax.scatter(x, y, z)
plt.show()

错误是:

  

无法执行第10行:ax.scatter(x,y,z)

     

AttributeError:“ PathCollection”对象没有属性“ do_3d_projection”

通常,scatter在Zeppelin的python中不起作用,并出现上述错误。 Aslo,this solution对我不起作用。

1 个答案:

答案 0 :(得分:0)

回答得有点晚了...

您可以尝试切换到Python x64位。不要使用x86版本。 enter image description here 安装后,请记住编辑Python的PATH优先级。另外,您可能需要在命令行中输入“ python”进行验证。 enter image description here 此解决方案应仅在64位系统上运行。真的不知道问题是否可以在32位上发生。