içinde kurulum araçlarını alabilirim. Yeni bir macda kurulum yapıyorum ve iyice karıştırıyordum, pip ve birkaç paket kuruyordum. aniden, çalıştırmayı çalışacaktı her pip komutpip "ImportError: setuptools adında bir modül yok", ancak python yorumlayıcısı
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
atmak ne zaman ben yanlışlıkla bir dizin ya da bir şey silinmiş olduğunu düşündüm, bu yüzden bu sitede other answers tavsiyesiyle, Setuptools'u yeniden çalıştı. Setuptools yumurtalarını here'dan indirdim ve bir kabuk komut dosyası gibi çalıştırdım. Bu çıktıyı var: Ben bir interaktif piton oturumu başlatmak eğer, Şimdi
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
, ben import setuptools
hatasız, ama pip (ve diğer komut satırı komut dosyaları) yüklü değil şikayet edebilirsiniz. Python'un neden bunu bulduklarına dair herhangi bir fikir var, ama başka senaryolar değil? Eğer yardımcı olur
, bu sys.path
içinde ne olduğunu:
/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
Pip hatasının Python 2.6 izini gösterdiğine dikkat edin, ancak diğerleri Python 2.7 kullanıyor. Pip üst düzey komut dosyanızın üst satırı neye benziyor? – Keith