#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    14
    Rep Power
    0

    Plotting data with matplot


    I have installed python 2.7.5 on windows 7,after that,i installed wxpython tool and now i installed matplotlib for python 2.7.5 win32.I have used default setting on all installations.

    my code:
    import matplotlib.pyplot as plt
    plt.plot([1,2,3,4],[1,2,3,4])

    problem
    Traceback (most recent call last):
    File "C:/Python27/deleteme.py", line 1, in <module>
    import matplotlib.pyplot as plt
    File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 111, in <module>
    raise ImportError("matplotlib requires dateutil")
    ImportError: matplotlib requires dateutil

    i do not know how to deal with this one,i hope someone has an idea of how to deal with this error: 'matplotlib requires dateutil'


    Edit:I did bother to google: 'dateutil'. i went on this website: https://pypi.python.org/pypi/python-dateutil
    i have a file named 'python-dateutil-2.1' , click setup.exe a black window pops up and then nothing.I suspect i have to install a number of packages....because i have only installed python itself,wxpython and matplotlib....i do not know what....
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,840
    Rep Power
    480
    install enthought canopy .

    Program works.

    Use

    plt.show()

    to display the line.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    14
    Rep Power
    0
    thank you

IMN logo majestic logo threadwatch logo seochat tools logo