问题
I receive this error when trying to upgrade pip on python 35 with the command:
C:\WINDOWS\system32>python -m pip install --upgrade pip
PermissionError: [WinError 5] Access is denied: 'c:\program files\python35\lib\site-packages\pip-7.1.2.dist-info\description.rst' -> 'C:\Users\Athena\AppData\Local\Temp\pip-g9zbqikf-uninstall\program files\python35\lib\site-packages\pip-7.1.2.dist-info\description.rst'
I notice that it is looking in C:\program files\python35
. Unlike previous versions of python, 3.5 installs in C:\Program files (x86)\35-32
. How should I go about getting past this error?
回答1:
Run command line as an administrator; should resolve the issue (search for "cmd", right-click "Run as administrator"). You can also use the executable for Windows for easy-to-configure install.
ALSO...make sure you're using the verison of pip you think you are -- my default pip links to my Strawberry perl application -- I need to cd into the python\Scripts directory to run the one I want (command is: where pip).
回答2:
I had the same problem, but I solved it by running the cmd as Administrator and did pip install "name of package"
.
来源:https://stackoverflow.com/questions/35990671/error-installing-python-3-5-on-win-10