Nicht verwenden easy_install zum installieren von Python-Modulen
Ich versuche, mit easy_install
um ein Modul zu installieren, genannt Anfragen by doing
easy_install requests
Klappte vor einer Woche als ich mit Python 2.6.5, aber heute habe ich installiert, Python 2.7.2 und dann versucht zu import requests
in einem meiner scripts, aber es scheiterte. Dann habe ich versucht, Neuinstallation von Anfragen mit easy_install requests
aber habe diesen Fehler
install_dir /usr/local/lib/python2.6/dist-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-15207.pth'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.6/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://packages.python.org/distribute/easy_install.html
Please make the appropriate changes for your system and try again.
Also mir wurde gesagt, zu gehen, installieren Sie easy_install, und ich ging zu http://pypi.python.org/pypi/setuptools und gelernt hatte ich zu
löschen Sie alle setuptools*.ei und setuptools.pth-Dateien von Ihrem
system-site-packages-Verzeichnis (und alle anderen sys.Pfad-Verzeichnisse)
ERSTE.
Also Tat ich dies. Ich habe dann neu installiert setuptools aus der setuptools-0.6c11-py2.7.egg
. Es schien erfolgreich, aber bei mir lief easy_install requests
ich habe im Grunde den gleichen Fehler, außer das Verzeichnis python2.6/dist-packages ist jetzt python2.7/site-packages
siddhion@siddhion-laptop:~$ easy_install requests
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/test-easy-install-16253.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
Auch, wenn ich easy_install
und drücken Sie tab, erhalte ich diese Optionen
easy_install easy_install-2.6 easy_install-2.7
Kommen, wie easy_install-2.6 gibt es?
und
Wie bekomme ich easy-install wieder funktioniert?
InformationsquelleAutor der Frage Classer | 2011-10-01
Du musst angemeldet sein, um einen Kommentar abzugeben.
Haben Sie versucht, mit
sudo
so?Oder geben Sie das Installationsverzeichnis in ein Verzeichnis, das Sie über Schreibberechtigungen.
Aber Sie sollten wirklich PIP statt
easy_install
. Es ist viel besser und hat viel mehr features.InformationsquelleAutor der Antwort Praveen Gollakota
Folgende hat bei mir mit Ubuntu 12.10 Installation von easy_install dann pip:
InformationsquelleAutor der Antwort Alastair
Sollten Sie verwenden
virtualenv
auf Paket-basierte Linux-Distributionen, so dass Python-Skripte stören nicht mit anderen Paketen oder Konflikt mit der OS-Paket-manager.http://workaround.org/easy-install-debian
InformationsquelleAutor der Antwort Federico
Haben Sie versucht, indem Sie Ihre neue python.Rahmen Pfad?
Unter mountain lion habe ich Hinzugefügt
/Library/Frameworks/Python.framework/Versions/3.3/bin/
zu
/etc/paths
und dann war ich in der Lage zu verwenden easy_install-3.3 und pip-3.3
InformationsquelleAutor der Antwort Eder Santana
Mit
Sudo
voreasy_install
kann Ihr problem lösenDank
InformationsquelleAutor der Antwort ibmstafa
Könnte es einfach so sein, dass Sie fehlendes "sudo" in der front. Können Sie versuchen, es mit sudo easy-install-Anfragen
setzen die "sudo" hinzufügen der erforderlichen Berechtigungen.
InformationsquelleAutor der Antwort AshLogan