python.exe -m pip install --upgrade pip
更新pip失败
首先解决
WARNING: Ignoring invalid distribution -pencv-python (d:\2022software\anaconda\lib\site-packages)
问题,
打开地址:d:\2022software\anaconda\lib\site-packages
删除文件:
然后WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pip/,
以为是镜像源的问题,
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
python.exe -m pip install --upgrade pip-i http://mirrors.aliyun.com/pypi/simple
结果换了清华源,阿里云没解决,
ERROR: Cannot unpack file C:\Users\13767\AppData\Local\Temp\pip-unpack-nfvvrhxi\simple (downloaded from C:\Users\13767\AppData\Local\Temp\pip-req-build-k_dmi2xh, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\13767\AppData\Local\Temp\pip-req-build-k_dmi2xh还是报错
放弃镜像,
尝试清理pip的缓存:pip cache purge
。
再运行
python.exe -m pip install --upgrade pip
,又成功了~