Python - import error in matplotlib raindrop example
Question: I'm trying to run [Nicolas Rougier's raindrop
animation](http://matplotlib.org/examples/animation/rain.html) using
`matplotlib` (version 1.4.3) on my Python 2.7.10 IDLE (running on a Mac, OS X
10.10.5) but am getting the following import error:

    
    
    Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
    ....
        from matplotlib import pyplot as plt
      File "/Library/Python/2.7/site-packages/matplotlib/pyplot.py", line 34, in <module>
        from matplotlib.figure import Figure, figaspect
      File "/Library/Python/2.7/site-packages/matplotlib/figure.py", line 40, in <module>
        from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
      File "/Library/Python/2.7/site-packages/matplotlib/axes/__init__.py", line 4, in <module>
        from ._subplots import *
      File "/Library/Python/2.7/site-packages/matplotlib/axes/_subplots.py", line 10, in <module>
        from matplotlib.axes._axes import Axes
      File "/Library/Python/2.7/site-packages/matplotlib/axes/_axes.py", line 21, in <module>
        import matplotlib.dates as _  # <-registers a date unit converter
      File "/Library/Python/2.7/site-packages/matplotlib/dates.py", line 126, in <module>
        from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
      File "/Library/Python/2.7/site-packages/dateutil/rrule.py", line 16, in <module>
        from six.moves import _thread
    ImportError: cannot import name _thread
    

The script I'm using is exactly the same as in the link but I had to insert
the statements `import matplotlib` and `matplotlib.use('TKAgg')` before
`pyplot` and `FuncAnimation` import statements at the top.


Answer: You need to re-install the dateutil package for python.

    
    
    sudo pip uninstall dateutil
    sudo pip install python-dateutil==2.2
    

