Could not fetch URL, There was a problem confirming the ssl certificate & Could not find a version that satisfies the requirement Problem

Viewed 203

I'm trying to install PyPDF4 in Anaconda. When I do pip install PyPDF2, it shows

Could not fetch URL https://pypi.org/simple/pypdf2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pypdf2/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) - skipping Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) - skipping

I also tried to install through pip install --index-url=https://pypi.org/simple/pip/ PyPDF2, but it still shows

Looking in indexes: https://pypi.org/simple/pip/ Could not fetch URL https://pypi.org/simple/pip/pypdf2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/pypdf2/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) - skipping Could not fetch URL https://pypi.org/simple/pip/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)'))) - skipping

I followed some guides online, and tried and install through pip3 install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip PyPDF2, but it shows

ERROR: Could not find a version that satisfies the requirement PyPDF2 (from versions: none) ERROR: No matching distribution found for PyPDF2

instead. I did try to update Python version but it still didn't work (Python version 3.9.12)

Could anyone tell me how I should fix these problems? Thank you!

0 Answers
Related