easy_install.exe Permission Denied on Windows 8

北战南征 提交于 2019-11-30 16:56:59

问题


Running command prompt as an administrator I try to run:

easy_install -U setuptools

It returns the following:

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

I've spent the past few hours scouring the internet for possible solutions. I've tried messing with the UAC settings and have them set to Never Notify. Yet, I'm still getting this permission denied error.


回答1:


You can read the solution here.

Run the install.
After the error copy the easy_install .exe and .py to a temp dir (i.e. c:\temp).
Run the install again from there.

On windows, the easy_install binary is in-use during install so it can't overwrite itself. (Easy_install itself is part of the setuptools you're trying to install with itself ;)




回答2:


Another way would be to use the other python package manager: Pip.

easy_install pip    
pip install --upgrade setuptools

This gets around the "in-use" problem without having to move files around.



来源:https://stackoverflow.com/questions/17601020/easy-install-exe-permission-denied-on-windows-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!