5
Ich benutze Ubuntu 14.04, versuchte, Python-Memcache zu installieren. Ich habe einen Fehler bekam wie'Modul' Objekt hat kein Attribut 'PY2'
Downloading/unpacking python-memcached
Downloading python-memcached-1.53.tar.gz
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 292, in run_egg_info
logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name))
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 284, in setup_py
if six.PY2 and isinstance(setup_py, six.text_type):
AttributeError: 'module' object has no attribute 'PY2'
Storing debug log for failure in /home/mani/.pip/pip.log
Ich erhalte die gleiche Fehlermeldung, wenn Django-Sellerie Installation pymongo etc
Wenn Sie 'six' Modul keine' PY2' hat, der wahrscheinlichste Grund ist, dass Sie ein anderes Paket sechs benannt haben irgendwo. Was zeigt Folgendes, wenn Sie es im Interpreter ausführen: 'import six; sechs .__ Datei__' Auch, 'sechs .__ Version__'. – otus
>>> sechs >>> sechs .__ FILE__ '/usr/local/lib/python2.7/dist-packages/six.pyc' importieren >>> sechs .__ version__ '1.3.0' – ManikandanV
Ok, Deine 'Sechs' sind sehr alt. Ich bezweifle, dass es die Ursache ist, aber Sie könnten versuchen, es zu aktualisieren: 'pip install --upgrade six'. Kann dir wirklich nicht weiterhelfen, wenn das nicht ist. – otus