Cache entry deserialization failed, entry ignored

Question:

C:Usersdeypr>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 python3 package.

  1. What could be the possible reasons?

  2. How to fix it ?

Asked By: Pronomita Dey

||

Answers:

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

Try:

pip3 install scikit-learn
Answered By: Vivek Kumar

It was a network issue. It worked totally fine when I moved to a different network.

Answered By: Pronomita Dey

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:

rm -rf ~/.cache/pip
Answered By: Franck Dernoncourt

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

For example:

>>> pip install keras --no-cache-dir
Answered By: B. Kanani

Another reason might be that you have a lower python version. For instance, you install tensorflow on python 3.6.0 and you’ll get Cache entry deserialization failed, entry ignored for many libraries that come with tensorflow.

But if you use python 3.8.0, all is good.

Answered By: Bendemann

There are two methods
one removes cache

sudo rm -rf ~/.cache/pip

Other install package with –no-cachw-dir

pip install --no-cache-dir Package_Name

if it is not solved restart your working machine

Answered By: Syed Ibtehaj Ali