我试图使用easy_install
做无法使用easy_install的安装Python模块
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的从 系统的站点包目录(以及任何其他的sys.path目录) FIRST .pth文件。
所以我这样做。然后我重新安装了setuptools-0.6c11-py2.7.egg
的setuptools。这似乎成功,但,当我跑easy_install requests
我得到了基本相同的错误除了目录python2.6的/ DIST-包现在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在那里?
和
我如何易于安装工作了?
是我没有'须藤的easy_install requests'但也不能工作。问题是,看起来我的Python路径有些问题。 easy_install或Python 2.7.2正在寻找我认为错误的路径。像Python 2.7.2一样在python2.6/dist-packages目录中查找。不确定。 – Classer
我也在浏览这个,没有'sudo'或者我只是用它。 – Amanda