2012-07-17 4 views
4

OSX Lion에서 scipy, numpy 및 matplotlib의 설치가 끝났습니다. 어떤 이유로, 나는 할 수 없습니다 :Axes3d 대 axes3d matplotlib

Traceback (most recent call last): 
    File "3dPlot.py", line 2, in <module> 
    from mpl_toolkits.mplot3d import Axes3d 
ImportError: cannot import name Axes3d 

하지만 내가 할 수있는 :

import matplotlib.pyplot as plt 
from mpl_toolkits.mplot3d import Axes3d 

오류 출력은

import matplotlib.pyplot as plt 
from mpl_toolkits.mplot3d import axes3d 

이 Axes3d와 axes3d 사이에 다른 있습니까, 또는 어떤 이유로 든 소문자 'a'로 명명 된 내 파일입니까?

답변

4

다음 두 가지 (대소 문자를 시청) 나를 위해 작동 :

from mpl_toolkits.mplot3d import Axes3D 
from mpl_toolkits.mplot3d import axes3d 

하지만 난 당신이 (소문자 차원에서 D로) 쓴 대해 동일한 오류가 발생합니다. 작동하는 두 가지 가져 오기는 동등하지 않습니다.

+0

아, 나는 어리 석다. 도와 주셔서 감사합니다. –

+0

설치 장소는 https://sourceforge.net/projects/matplotlib/?source=typ_redirect입니다. – Tom