0

Got this error when importing matplotlib.pyplot. But I have checked the version of six installed using pip list, and it returns version 1.9.0. And when I checked six.__version__, it returns 1.2.0.

Could any one help me?

falsetru
  • 357,413
  • 63
  • 732
  • 636

3 Answers3

0

Check you're using the correct version of pip that refer the correct Python version by issuing following command:

pip -V

The command will show the Python version the pip is using and the path of pip package.

falsetru
  • 357,413
  • 63
  • 732
  • 636
0

There is probably a bug somewhere, but a quick and dirty work around was the following:

pip install six==1.8.0

cchristelis
  • 1,985
  • 1
  • 13
  • 17
0

I ran into the same thing, the cause was a left over six.pyo / six.pyc in my PYTHONPATH dir which was imported instead of the installed version.