I tried to import matplotlib and pandas, like this (but separately):
import matplotlib.pyplot
import pandas
but each time there was an error. When i imported pandas, it said
Traceback (most recent call last):
File "<pyshell#36>", line 1, in <module>
import pandas
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pandas\__init__.py", line 23, in <module>
from pandas.compat.numpy import *
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pandas\compat\__init__.py", line 439, in <module>
from dateutil import parser as _date_parser
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\dateutil\parser\__init__.py", line 2, in <module>
from ._parser import parse, parser, parserinfo
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\dateutil\parser\_parser.py", line 43, in <module>
from six import binary_type, integer_types, text_type
ImportError: cannot import name 'binary_type'
so I went on command prompt (windows) and tried pip install --upgrade pandas
and pip install binary_type
, but neither of them worked.
When I imported matplotlib, it said
Traceback (most recent call last):
File "<pyshell#40>", line 1, in <module>
import matplotlib.pyplot
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\matplotlib\__init__.py", line 127, in <module>
from . import cbook
File "C:\Users\bobby\AppData\Local\Programs\Python\Python35-32\lib\site-packages\matplotlib\cbook\__init__.py", line 12, in <module>
from six.moves import xrange, zip
ImportError: No module named 'six.moves'; 'six' is not a package
so like before I did pip install --upgrade six
, pip install six
, and pip install six.move
, but none of these work.
What should I do so that both of these modules work?