Windows 8上的easy_install.exe权限被拒绝

CKa*_*Kav 8 windows command-prompt setuptools easy-install windows-8

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

easy_install -U setuptools
Run Code Online (Sandbox Code Playgroud)

它返回以下内容:

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
Run Code Online (Sandbox Code Playgroud)

我花了几个小时在互联网上寻找可能的解决方案.我已经尝试搞乱UAC设置并将它们设置为Never Notify.然而,我仍然得到这个权限被拒绝的错误.

Rik*_*Rik 11

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

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

在Windows上,easy_install二进制文件在安装期间正在使用,因此无法覆盖自身.(Easy_install本身是您尝试自行安装的setuptools的一部分;)


haz*_*zey 8

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

easy_install pip    
pip install --upgrade setuptools
Run Code Online (Sandbox Code Playgroud)

这可以解决"使用中"问题而无需移动文件.