0

I get this error when i try to import matplotlib. I have installed matplotlib.

Traceback (most recent call last):   
  File "<pyshell#23>", line 1, in <module>     
   import matplotlib   
  File "C:\Python27\lib\site-packages\matplotlib\__init__.py", line 110, in <module>     
   raise ImportError("matplotlib requires dateutil") 
ImportError: matplotlib requires dateutil 

how do I solve this problem?

Patrick Haugh
  • 59,226
  • 13
  • 88
  • 96
  • did you installed matplotlib using pip? – radbrawler Nov 07 '16 at 12:17
  • 1
    Possible duplicate of [ImportError: matplotlib requires dateutil](http://stackoverflow.com/questions/18280436/importerror-matplotlib-requires-dateutil) – SiHa Nov 07 '16 at 12:39

1 Answers1

0

matplotlib depends on dateutil

On Linux you can install it using

pip install python-dateutil


You can reinstall them forcefully using

pip install python-dateutil --force-reinstall --upgrade


To install pip on windows get the script get-pip.py from here. Then on cmd run

python get-pip.py

radbrawler
  • 2,391
  • 2
  • 15
  • 22