Я пытаюсь использовать easy_install
для установки модуля с именем запросов, выполнив
easy_install requests
Это отлично работало неделю назад, когда я использовал Python 2.6.5, но сегодня я установил Python 2.7.2, а затем попытался import requests
в одном из моих сценариев, но это не удалось. Затем я попытался переустановить запросы с помощью easy_install requests
, но получил эту ошибку
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.
Итак, мне сказали переустановить easy_install, и я пошел в http://pypi.python.org/pypi/setuptools и узнал, что должен был
удалить все файлы setuptools *.egg и setuptools.pth из вашего system site-packages (и любые другие каталоги sys.path) FIRST.
Итак, я сделал это. Затем я переустановил setuptools из setuptools-0.6c11-py2.7.egg
. Он казался успешным, но когда я побежал easy_install requests
, я получил в основном ту же ошибку, кроме каталога python2.6/dist-packages теперь python2.7/site-packages
[email protected]:~$ 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.
Кроме того, когда я делаю easy_install
и нажимаю вкладку, я получаю эти параметры
easy_install easy_install-2.6 easy_install-2.7
Как выглядит easy_install-2.6?
и
Как я могу упростить работу снова?