Could not fetch URL https://pypi.org/simple/xxxx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/xxxx
l/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),)) - skipping
ERROR: Could not find a version that satisfies the requirement xxxx (from versions: none)
ERROR: No matching distribution found for xxxx
原因:
python高版本需要验证ssl,可以添加--trusted-host 来解决,所有host都得--trusted-host
解决:文章来源:https://www.toymoban.com/news/detail-666700.html
# 这里用的国内清华镜像源,注意安装包xxxx需要替换为你要安装的第三方包
pip --trusted-host pypi.python.org --trusted-host pypi.tuna.tsinghua.edu.cn install xxxx -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip指定镜像源安装GPU版pytorch文章来源地址https://www.toymoban.com/news/detail-666700.html
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
到了这里,关于python安装第三方包异常【SSLEOFError】、[SSL: CERTIFICATE_VERIFY_FAILED]的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!