When I try to execute python code with import matplotlib, I received following errors:
Traceback (most recent call last):
File "plotPRREachNode.py", line 6, in
import matplotlib.pyplot as pl
File "/Library/Python/2.7/site-packages/matplotlib-1.2.x-py2.7-macosx-10.8-intel.egg/matplotlib/pyplot.py", line 26, in
from matplotlib.figure import Figure, figaspect
File "/Library/Python/2.7/site-packages/matplotlib-1.2.x-py2.7-macosx-10.8-intel.egg/matplotlib/figure.py", line 19, in
from axes import Axes, SubplotBase, subplot_class_factory
File "/Library/Python/2.7/site-packages/matplotlib-1.2.x-py2.7-macosx-10.8-intel.egg/matplotlib/axes.py", line 19, in
import matplotlib.dates as mdates
File "/Library/Python/2.7/site-packages/matplotlib-1.2.x-py2.7-macosx-10.8-intel.egg/matplotlib/dates.py", line 122, in
from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
ImportError: No module named dateutil.rrule
The method to solve this error is go to http://labix.org/python-dateutil/#head-2f49784d6b27bae60cde1cff6a535663cf87497b and download the python-dateutil-1.5.tar.gz
Then untar the file and type in command line:
python setup.py install
That's it, wish this could help.