C:\Users\deypr>pip3 install sklearn
Collecting sklearn
Cache entry deserialization failed, entry ignored
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)': /simple/sklearn/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)': /simple/sklearn/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)': /simple/sklearn/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)': /simple/sklearn/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)': /simple/sklearn/
Could not fetch URL https://pypi.python.org/simple/sklearn/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/sklearn/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)'),)) - skipping
Could not find a version that satisfies the requirement sklearn (from versions: )
No matching distribution found for sklearn
每当尝试安装任何 python3 包时,我都会收到此错误。
可能的原因是什么?
如何解决?
答案 0 :(得分:8)
这是一个网络问题。当我搬到不同的网络时工作得很好。谢谢大家:)
答案 1 :(得分:2)
答案 2 :(得分:0)
关于问题标题中的错误/警告消息:
缓存条目反序列化失败,条目被忽略
您可以通过删除点子缓存来修复它,例如在Ubuntu上:
rm -rf ~/.cache/pip
答案 3 :(得分:0)
只需使用-no-cache-dir 运行pip命令。
例如:
>>> pip install keras --no-cache-dir
答案 4 :(得分:0)
另一个原因可能是您的 Python 版本较低。例如,您在 python 3.6.0 上安装 tensorflow
,您将获得 Cache entry deserialization failed, entry ignored
附带 tensorflow
的许多库。
但如果你使用 python 3.8.0,一切都很好。