8

以管理员身份运行命令提示符我尝试运行:

easy_install -U setuptools

它返回以下内容:

Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Reading http://peak.telecommunity.com/snapshots/
Reading https://pypi.python.org/pypi/setuptools
Best match: setuptools 0.8
Processing setuptools-0.8-py2.7.egg
setuptools 0.8 is already the active version in easy-install.pth
Installing easy_install-script.py script to C:\Python27\Scripts
Installing easy_install.exe script to C:\Python27\Scripts
error: C:\Python27\Scripts\easy_install.exe: Permission denied

在过去的几个小时里,我一直在网上搜索可能的解决方案。我试过弄乱 UAC 设置并将它们设置为从不通知。但是,我仍然收到此权限被拒绝错误。

4

2 回答 2

12

您可以在此处阅读解决方案。

运行安装。
出错后将easy_install .exe 和.py 复制到临时目录(即c:\temp)。
从那里再次运行安装。

在 Windows 上,easy_install 二进制文件在安装过程中处于使用状态,因此它无法覆盖自身。(Easy_install 本身是您尝试自行安装的 setuptools 的一部分;)

于 2013-07-16T22:05:17.537 回答
8

另一种方法是使用另一个 python 包管理器:Pip。

easy_install pip    
pip install --upgrade setuptools

这可以解决“使用中”问题,而无需移动文件。

于 2014-06-10T02:45:53.153 回答