-1

When I try to install libraries in python, I get 5 warnings, and then an error: ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/a6/0c/c2a72d51fe56e08a08acc85d13013558a2d793028ae7385448a6ccdfae64/xlrd-2.0.1-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))).

That happens with every library that I try to install. For example, I tried to install xlrd, using pip install xlrd and nothing happened. I looked for solutions, like using --user in the end, or upgrading pip, and still didn't work.

GBilianis
  • 13
  • 3
  • I forgot to mention, this is a work computer, so I can't run command line as administrator. – GBilianis May 03 '23 at 10:22
  • Try: `python.exe -m pip install package` instead. – Cow May 03 '23 at 10:24
  • 1
    It could be a permission issue. post the full error message. – Nick May 03 '23 at 10:24
  • ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/a6/0c/c2a72d51fe56e08a08acc85d13013558a2d793028ae7385448a6ccdfae64/xlrd-2.0.1-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))) – GBilianis May 03 '23 at 10:25
  • Using python exe didn't work as well. – GBilianis May 03 '23 at 10:27
  • 2
    Please [edit] your question to improve your [mcve] instead of adding further info in comments. – JosefZ May 03 '23 at 10:30
  • 1
    I think your question is related to this one [stackoverflow: pip install fails, error SSL certificated](https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi). – Memristor May 03 '23 at 10:36
  • Thanks a lot Memristsor. That worked. It had something to do with permissions, as you guys thought from the beginning. Many thanks to everyone. – GBilianis May 03 '23 at 10:40

1 Answers1

-2

It's possible that your user is not a administrator. Try Run CMD in administrator mode and enter: pip install package-name --user

Could be pip3 instead.

[]s

  • yes, I have tried these solutions, as I explained in the post. I am not administrator, this is a work computer. – GBilianis May 03 '23 at 10:30