I'm running python 3.6 on Mac OS X El Capitan.
I'm trying to run code that uses the six module, but am getting the following error:
ImportError: No module named six
.
When I search for six it appears no problem, and I've made sure that the location is included in the sys.path
$ pip show six
Name: six
Version: 1.10.0
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
Author-email: [email protected]
License: MIT
Location: /usr/anaconda/lib/python3.6/site-packages
However, when I try to run something basic I encounter an error:
$ python -c "import six; print (six.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'six' has no attribute 'version'
I've tried uninstalling and reinstalling, and have tried installing using $ python -m pip install six
, but nothing has worked.
If anyone has any ideas or needs more information, I would appreciate it.
This should work:
pip install --ignore-installed six
more info here: https://github.com/pypa/pip/issues/3165