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高版本需要驗(yàn)證ssl,可以添加--trusted-host 來解決,所有host都得--trusted-host
解決:文章來源:http://www.zghlxwxcb.cn/news/detail-666700.html
# 這里用的國內(nèi)清華鏡像源,注意安裝包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文章來源地址http://www.zghlxwxcb.cn/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
到了這里,關(guān)于python安裝第三方包異?!維SLEOFError】、[SSL: CERTIFICATE_VERIFY_FAILED]的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!