2017-05-09 3 views
1

Le problème a commencé lorsque j'essayais d'installer twilio sur mon Mac avec El Capitan 10.11.6.Problèmes avec le module Six en Python2.7

J'ai eu cette erreur:

OSError: [Errno 1] Operation not permitted: '/tmp/pip-EmsRHo-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pyOpenSSL-0.13.1-py2.7.egg-info' 

recherche informé que je courrais pip install --ignore-installed six, qui affiche l'erreur suivante:

Exception:

Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install 
    **kwargs 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files 
    isolated=self.isolated, 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber 
    shutil.copyfile(srcfile, destfile) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile 
    with open(dst, 'wb') as fdst: 
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/six.py' 

Des recherches plus approfondies m'a dit de courir brew install python

Une fois agai n a tenté d'exécuter pip install twilio

Nouvelle erreur:

Traceback (most recent call last): 
    File "/usr/local/bin/pip", line 6, in <module> 
    from pkg_resources import load_entry_point 
    File "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module> 
    import six 
ImportError: No module named six 

J'ai essayé de pip install six, mais continue à obtenir cette erreur:

Traceback (most recent call last): 
    File "/usr/local/bin/pip", line 6, in <module> 
    from pkg_resources import load_entry_point 
    File "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 48, in <module> 
    import six 
ImportError: No module named six 

Tout semble foireuse à la suite de ne pas avoir le module six. Je ne peux pas installer ou désinstaller six. Même pip freeze affiche le ImportError: No module named six.

+0

Avez-vous essayé 'pip install --ignore-installed six' après avoir installé python avec' brew'? – wpercy

+0

@wpercy Oui. Même problème: 'Rebeccas-MacBook-Pro: jardinage rdacso $ pip install --ignore-installed six Traceback (dernier appel en dernier): Fichier"/usr/local/bin/pip ", ligne 6, en de pkg_resources importation load_entry_point fichier "/Users/rdacso/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", ligne 48, à importation six ImportError: Aucun module nommé six' – rdacso

Répondre

0

Il s'avère que j'ai couru brew install python J'ai réussi à installer une deuxième bibliothèque python. Cela a causé des pythons en duel.

J'ai couru brew uninstall python, pip réinstallé en utilisant easy_install pip, ce qui m'a donné la possibilité de nouveau pip install six. Après cela, j'ai pu installer twilio en utilisant easy_install twilio au lieu de .