0

I am new to python and using pycharm.

I am tring to install some packages (such as pandas) but it shows me an error:

Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))) - 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: unable to get local issuer certificate (\_ssl.c:992)'))) - skipping

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))': /simple/numpy/

WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))': /simple/numpy/

WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))': /simple/numpy/

WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))': /simple/numpy/

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '\[SSL: CERTIFICATE_VERIFY_FAILED\] certificate verify failed: unable to get local issuer certificate (\_ssl.c:992)'))': /simple/numpy/

ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)

ERROR: No matching distribution found for numpy

I hoped it would work, I saw this Error to install packages in python

and it is basically my question, but I didn't get a clear answer on what to do.

I don't want to have to download and install manually

UPDATE: It workes to install like this:

pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host numpy

any idea what I need to do - configurations settings , to fix it?

HMT
  • 21
  • 5
  • What command did you use to install numpy? Also what version of python do you have installed? – Marcelo Paco Apr 22 '23 at 22:48
  • Python 3.11.1 I tried to run pip install numpy, and also tried via the package installer in pycharm – HMT Apr 22 '23 at 22:57
  • Have you tried installing again recently? I just checked the `pypi` entry for `numpy` and they seemed to have done an update two hours ago. – Marcelo Paco Apr 22 '23 at 23:08
  • I just did, but is still not working .Thanks for your help – HMT Apr 22 '23 at 23:10
  • Try upgrading `pip`: `python -m pip install --upgrade pip` and then try again. – Marcelo Paco Apr 22 '23 at 23:16
  • This also didn't work, it has the same error: WARNING: There was an error checking the latest version of pip. (after the Retrying... like is listed in the question) – HMT Apr 22 '23 at 23:18
  • Would you want to continue trying to figure this out in a stack overflow chat room? https://chat.stackoverflow.com/rooms/253289/marcelo-paco – Marcelo Paco Apr 22 '23 at 23:23
  • I don't think I can use the chat room because I don't have enough reputation – HMT Apr 22 '23 at 23:26
  • I see. I didn't know there was a reputation cap. Why don't you try `python get-pip.py` instead. – Marcelo Paco Apr 22 '23 at 23:27
  • can't open file 'C:\\Users\\Hadassa Menucha\\PycharmProjects\\testing\\get-pip.py': [Errno 2] No such file or directory – HMT Apr 22 '23 at 23:28
  • Sorry, you have to download it first: https://bootstrap.pypa.io/get-pip.py Here is the documentation that describes the procedure: https://pip.pypa.io/en/stable/installation/#get-pip-py – Marcelo Paco Apr 22 '23 at 23:30
  • Did that method work? – Marcelo Paco Apr 22 '23 at 23:42

1 Answers1

0

I have answered this question in another page, please check it here:

Python - Cannot upgrade pip or install any packages due to SSL Certificate errors

  • Hi, Thanks for the clear answer, just trying to confirm: I made a text file and put inside whatever you wrote. but it is still not working, what kind of file was I supposed to create? – HMT May 08 '23 at 18:43