![Ich habe ein Problem mit easy_install unter OSX 10.6](https://rvso.com/image/1259377/Ich%20habe%20ein%20Problem%20mit%20easy_install%20unter%20OSX%2010.6.png)
Ich habe ein paar Google-Suchen durchgeführt und bin nicht fündig geworden.
Die Ausgabe ist wie folgt
$ easy_install yolk
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/usr/bin/easy_install-2.6", line 10, in <module>
load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2174, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1907, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/extension.py", line 2, in <module>
from dist import _get_unpatched
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/dist.py", line 5, in <module>
from setuptools.command.install import install
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/setuptools/command/install.py", line 2, in <module>
from distutils.command.install import install as _install
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py", line 516, in <module>
main()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py", line 499, in main
known_paths = addsitepackages(known_paths)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py", line 291, in addsitepackages
addsitedir(sitedir, known_paths)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute '__plen'
Irgendwelche Ideen?
Antwort1
Es scheint, als ob Sie ein kaputtes haben easy-install.pth
. Die einfachste Lösung wäre, es zu löschen. Führen Sie dazu in einem Terminal Folgendes aus:
sudo rm /Library/Python/2.6/site-packages/easy-install.pth
Dies hat jedoch den Nebeneffekt, dass Sie die mit installierten Pakete neu installieren müssen easy_install
.
Versuchen Sie übrigensPip- es ist nicht so beschissen.
pip ist ein Tool zum Installieren und Verwalten von Python-Paketen, wie sie beispielsweise im Python Package Index zu finden sind.
pip ist ein Ersatz für easy_install. Es verwendet größtenteils die gleichen Techniken zum Suchen von Paketen, sodass Pakete, die easy_installierbar sind, auch pip-installierbar sein sollten. Das bedeutet, dass Sie pip install SomePackage anstelle von easy_install SomePackage verwenden können.