Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

sugercoder Group Title

I installed matplotlib (1.3.1) and dateutil (1.5) into python site package folder. My python is 2.7.6. My computer is Win 7/64-bit. When I try to run: from matplotlib.pylab import * It still gives me error message "ImportError: No module named dateutil" How can I fix this? Thanks!

  • 11 months ago
  • 11 months ago

  • This Question is Open
  1. sugercoder Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    The entire error message is this: Traceback (most recent call last): File "C:\Python27\Courses\MIT 6.00 Intruduction to CS and Python\lec14.py", line 4, in <module> import matplotlib File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 111, in <module> raise ImportError("matplotlib requires dateutil") ImportError: matplotlib requires dateutil It looks like the matplotlib could not call the dateutil module also, I googled it and could not find a satisfactory answer. It is much appreciated if you can help me.

    • 11 months ago
  2. rsmith6559 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Generally, when you call a file with only it's name, it needs to be in the same directory that you're in. If I remember correctly, Python has an environmental variable MODULEPATH which is a list of directories to look for modules when they're called without a path. Basically, where is dateutil and where is matplotlib in the file system?

    • 10 months ago
  3. sugercoder Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    They are all in the folder Python27\Lib\site-packages.

    • 10 months ago
  4. rsmith6559 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Next thing to check would be to look at C:\Python27\lib\site-packages\matplotlib and see exactly how it's trying to import dateutil. Have you looked at the FAQ for matplotlib?

    • 10 months ago
  5. sugercoder Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    The file is C:\Python27\lib\site-packages\matplotlib\__init__.py The code which raises the problem is try: import dateutil except ImportError: raise ImportError("matplotlib requires dateutil") I installed dateutil from http://labix.org/python-dateutil#head-2f49784d6b27bae60cde1cff6a535663cf87497b So it means I did not install dateutil correctly?

    • 10 months ago
  6. Kainui Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    If you just want to play around in python, I believe khan academy has python just sort of built in to their website, and you can even save your stuff too. https://www.khanacademy.org/cs/new

    • 10 months ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.