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

Schreibe einen Kommentar