[newbie] Problem with matplotlib

jenswaelkens at gmail.com jenswaelkens at gmail.com
Sat Feb 20 02:42:38 EST 2016


When I use either of the following commands I get an error for which I don't have a solution, could someone here help me further?
These are the commands:
import matplotlib.pyplot as plt

or

from matplotlib.pyplot import pyplot as plt

This is the error I get:
Traceback (most recent call last):
  File "/home/waelkens/matplotlibdemo.py", line 2, in <module>
    from matplotlib.pyplot import pyplot as plt
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 27, in <module>
    import matplotlib.colorbar
  File "/usr/lib/python2.7/dist-packages/matplotlib/colorbar.py", line 36, in <module>
    import matplotlib.contour as contour
  File "/usr/lib/python2.7/dist-packages/matplotlib/contour.py", line 17, in <module>
    import matplotlib.ticker as ticker
  File "/usr/lib/python2.7/dist-packages/matplotlib/ticker.py", line 152, in <module>
    import decimal
  File "/usr/lib/python2.7/decimal.py", line 3744, in <module>
    _numbers.Number.register(Decimal)
AttributeError: 'module' object has no attribute 'Number'

thanks in advance
Jens


More information about the Python-list mailing list