Home > Blockchain >  pip errors out with SSLError [X509] PEM lib (_ssl.c:4264) [Win10]
pip errors out with SSLError [X509] PEM lib (_ssl.c:4264) [Win10]

Time:10-10

I can't update anything/install anything new using pip, the following error keeps occurring:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(9, '[X509] PEM lib (_ssl.c:4264)'))': /simple/<package>

I can install using the extended command

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name>

and I updated and force reinstalled my certifi package using this.

I thought it was a CA cert issue but, this didn't change anything with the normal command.

What's going wrong? (and how do I fix it?)

CodePudding user response:

Update: I tried this before as well as mentioned in the question, but force-reinstalling certifi using the long command (with trusted hosts) solved it.

I cannot understand how it did not work when I asked the question.

One thing I can see being the problem is that when I did this the other day, it installed the most recent version of certifi at that time, which would be 2021.05.xx (may 2021 basically).
However, when it reinstalled today, it installed version 2021.10.8 (8th Oct 2021); which means a new update was released yesterday.

I wonder if I had installed an outdated/previous version (basically not the same version as 2021.05.xx), would it have worked?

  • Related