当我安装web.py模块(pip install web.py/
Exception:
Traceback (most recent call last):
AttributeError: 'module' object has no attribute 'PY2'
Storing debug log for failure in /home/lzc/.pip/pip.log
解决方法:升级six,即sudo pip install --upgrade six
If you
six
module has noPY2
, the most likely reason is that you have anotherpackage named six somewhere. What does the following show if yourun it in the interpreter:import six; six.__file__
Also, six.__version__
.>>>import six >>> six.__file__'/usr/local/lib/python2.7/dist-packages/six.pyc' >>>six.__version__ '1.3.0' – Ok, your six is very old. I doubt it's the cause, butyou could try upgrading it:pip install --upgrade six .Can't really help you further if that's not it. | |
quotefrom:http://stackoverflow.com/questions/24081043/module-object-has-no-attribute-py2