Python 缓存条目反序列化失败,条目被忽略

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49671215/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 19:11:11  来源:igfitidea点击:

Cache entry deserialization failed, entry ignored

pythonwindowssslscikit-learninstallation

提问by Pronomita Dey

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

I am getting this error whenever trying to install any python3package.

每当尝试安装任何python3包时,我都会收到此错误。

  1. What could be the possible reasons?

  2. How to fix it ?

  1. 可能的原因是什么?

  2. 如何解决?

采纳答案by Pronomita Dey

It was a network issue. Worked totally fine when I moved to a different network. Thank you everyone :)

那是网络问题。当我移动到不同的网络时,工作完全正常。谢谢大家 :)

回答by Franck Dernoncourt

Regarding the error/warning message in the question's title:

关于问题标题中的错误/警告消息:

Cache entry deserialization failed, entry ignored

缓存条目反序列化失败,条目被忽略

You can fix it by removing the pip cache, e.g. on Ubuntu:

您可以通过删除 pip 缓存来修复它,例如在 Ubuntu 上:

rm -rf ~/.cache/pip

回答by Vivek Kumar

Its scikit-learn not sklearn on pypi. Check the documentation here

它的 scikit-learn 不是 pypi 上的 sklearn。检查文档here

Try:

尝试:

pip3 install scikit-learn

回答by B. Kanani

Just run the pip command with --no-cache-dir.

只需使用--no-cache-dir运行 pip 命令。

For example:

例如:

>>> pip install keras --no-cache-dir