title: pylab ImportError: No module named _thread
body: <p>From ubuntu 10.04, I installed pylab with easy_install.
  After some upgrade, I can import pylab.
  First I run ipython installed from easy_install:</p>
  
  <pre><code>$ ipython
  Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
  Type "copyright", "credits" or "license" for more information.
  
  IPython 0.11 -- An enhanced Interactive Python.
  ?         -&gt; Introduction and overview of IPython's features.
  %quickref -&gt; Quick reference.
  help      -&gt; Python's own help system.
  object?   -&gt; Details about 'object', use 'object??' for extra details.
  </code></pre>
  
  <p>Then I try to import matplotlib</p>
  
  <pre><code>In [1]: import matplotlib
  
  In [2]: matplotlib.__version__
  Out[2]: '1.0.1'
  </code></pre>
  
  <p>But when importing pylab failes as follow:</p>
  
  <pre><code>In [3]: import matplotlib.pylab
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  /home/claire/&lt;ipython-input-3-1d30b9aee20b&gt; in &lt;module&gt;()
  ----&gt; 1 import matplotlib.pylab
  
  /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib /pylab.py in &lt;module&gt;()
      218      silent_list, iterable, dedent
      219 
   --&gt; 220 from matplotlib import mpl  # pulls in most modules
      221 
      222 from matplotlib.dates import date2num, num2date,\
  
  /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib    /mpl.py in &lt;module&gt;()
        1 from matplotlib import artist
        2 from matplotlib import axis
  ----&gt; 3 from matplotlib import axes
        4 from matplotlib import cbook
        5 from matplotlib import collections
  
  /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib    /axes.py in &lt;module&gt;()
       17 import matplotlib.colors as mcolors
       18 import matplotlib.contour as mcontour
  ---&gt; 19 import matplotlib.dates as mdates
       20 from matplotlib import docstring
       21 import matplotlib.font_manager as font_manager
  
  /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib/dates.py in &lt;module&gt;()
      117 import matplotlib.ticker as ticker
      118 
  --&gt; 119 from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
      120      MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY
      121 from dateutil.relativedelta import relativedelta
  
  /usr/local/lib/python2.6/dist-packages/python_dateutil-2.0-py2.6.egg/dateutil/rrule.py in &lt;module&gt;()
      11 import datetime
      12 import calendar
  ---&gt; 13 import _thread
       14 import sys
       15 
  
  ImportError: No module named _thread
  </code></pre>
  
  <p>This may be a python_dateutil issue. I remove the old version (1.4.3) installed with synaptic but that doesn't fix the problem.</p>
  
  <p>How could I fix it without reinstalling everything?
  Thank you.
  Jean-Patrick</p>