From ubuntu 10.04, I installed pylab with easy_install. After some update, I can import pylab. First, I run ipython installed from easy_install:
$ 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. ? -> Introduction and overview of IPython features. %quickref -> Quick reference. help -> Python own help system. object? -> Details about 'object', use 'object??' for extra details.
Then I try to import matplotlib
In [1]: import matplotlib In [2]: matplotlib.__version__ Out[2]: '1.0.1'
But when importing pylab, the following happens:
In [3]: import matplotlib.pylab --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /home/claire/<ipython-input-3-1d30b9aee20b> in <module>() ----> 1 import matplotlib.pylab /usr/local/lib/python2.6/dist-packages/matplotlib-1.0.1-py2.6-linux-i686.egg/matplotlib /pylab.py in <module>() 218 silent_list, iterable, dedent 219 --> 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 <module>() 1 from matplotlib import artist 2 from matplotlib import axis ----> 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 <module>() 17 import matplotlib.colors as mcolors 18 import matplotlib.contour as mcontour ---> 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 <module>() 117 import matplotlib.ticker as ticker 118 --> 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 <module>() 11 import datetime 12 import calendar ---> 13 import _thread 14 import sys 15 ImportError: No module named _thread
This may be a python_dateutil problem. I uninstall the old version (1.4.3) installed using synaptic, but this does not fix the problem.
How can I fix this without reinstalling everything? Thanks. Jean Patrick