pip donner “ImportError: No module named setuptools” mais je peux importer setuptools interpréteur python
Je suis le programme d'installation sur un nouveau mac, et j'ai été chantonner tout simplement beau, l'installation de pip et quelques paquets. Quand tout à coup, chaque pip commande que j'allais essayer de courir jeter
Exception:
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/Library/Python/2.6/site-packages/pip-1.2.1-py2.6.egg/pip/commands/install.py", line 248, in run
import setuptools
ImportError: No module named setuptools
J'ai pensé que j'avais accidentellement supprimé un répertoire ou quelque chose, alors j'ai essayé de réinstaller setuptools, en suivant les conseils de d'autres réponses sur ce site. J'ai téléchargé le setuptools oeuf ici et il a couru comme un script shell. Obtiens ce résultat:
Processing setuptools-0.6c11-py2.7.egg
Removing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Copying setuptools-0.6c11-py2.7.egg to /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Installing easy_install-2.7 script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
Maintenant, si je commence un cours interactif de python session, je peux import setuptools
sans erreur, mais pip (et d'autres scripts ligne de commande) se plaignent qu'il n'est pas installé. Des idées pourquoi Python semble être de trouver, mais pas d'autres scripts?
Si ça aide, c'est ce qui est en sys.path
:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
OriginalL'auteur Hartley Brody | 2012-09-09
Vous devez vous connecter pour publier un commentaire.
Votre
pip
ne semble pas être en accord avec votre Python. Comparer:à
Si python2.7 a setuptools, alors vous devriez avoir
disponible, auquel cas
devrait vous donner
pip-2.7
.easy_install
à utiliser aussi avoir fait le tour.OriginalL'auteur DSM