pythoninstall用不了_无法使用easy_install安装Python模块

我试图使用easy_install来安装一个名为request的模块

easy_install requests

一周之前,当我使用Python 2.6.5时,这样工作正常,但是今天我安装了Python 2.7.2,然后尝试在我的一个脚本中导入请求,但是失败了.然后我尝试使用easy_install请求重新安装请求,但是收到此错误

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.

delete all setuptools*.egg and setuptools.pth files from your

system’s site-packages directory (and any other sys.path directories)

FIRST.

所以我做到了然后我从setuptools-0.6c11-py2.7.egg重新安装setuptools.这似乎是成功的,但是当我运行easy_install请求时,我得到基本相同的错误,除了目录python2.6 / dist-packages现在是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.

另外,当我做easy_install和按Tab键我得到这些选项

easy_install easy_install-2.6 easy_install-2.7

那么easy_install-2.6是怎么来的?

如何轻松安装再次工作?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值