通过pip更新pip时提示权限不足,重新使用系统管理员权限执行后报错。
PS C:\WINDOWS\system32> pip install -U pip
Script file 'd:\anaconda3\Scripts\pip-script.py' is not present.
这个时候是pip因为更新一半文件受损导致的
解决办法通过easy_install重新安装pip
easy_install pip
等待重新安装完成pip后就可以重新执行pip的更新
PS C:\WINDOWS\system32> easy_install pip
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/fe/3b/0fc5e63eb277d5a50a95ce5c896f742ef243be27382303a4a44dd0197e29/pip-20.2b1-py2.py3-none-any.whl#sha256=b4e230e2b8ece18c5a19b818f3c20a8d4eeac8172962779fd9898d7c4ceb1636
Best match: pip 20.2b1
Processing pip-20.2b1-py2.py3-none-any.whl
Installing pip-20.2b1-py2.py3-none-any.whl to d:\anaconda3\lib\site-packages
Adding pip 20.2b1 to easy-install.pth file
Installing pip-script.py script to d:\anaconda3\Scripts
Installing pip.exe script to d:\anaconda3\Scripts
Installing pip3-script.py script to d:\anaconda3\Scripts
Installing pip3.exe script to d:\anaconda3\Scripts
Installing pip3.8-script.py script to d:\anaconda3\Scripts
Installing pip3.8.exe script to d:\anaconda3\Scripts
Installed d:\anaconda3\lib\site-packages\pip-20.2b1-py3.7.egg
Processing dependencies for pip
Finished processing dependencies for pip