Closed
Description
I downloaded matplotlib-1.3.1.win-amd64-py2.7.exe
from http://matplotlib.org/downloads.html and tried to install matplotlib. After that, I tried to run
from mpl_toolkits.mplot3d import Axes3D
but (I ran it in ipython)
In [1]: from mpl_toolkits.mplot3d import Axes3D
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-a23df00dd457> in <module>()
----> 1 from mpl_toolkits.mplot3d import Axes3D
ImportError: No module named mpl_toolkits.mplot3d
I found that there is no __init__.py
in mpl_toolkits
folder in installed site-packages
which shows it a importable module. And after I manually added the __init__.py
copied from https://github.com/matplotlib/matplotlib/blob/master/lib/mpl_toolkits/__init__.py
everything got okay.
I don't know whether it's caused by my machine or not. If it's indeed a bug, hope developers can fix this, since I spent lots of time 'fixing' this 'bug'.