SSLCertVerificationError when loading a model
I am exploring potential opportunities of using HuggingFace “Transformers”.I have been trying check some basic examples from the introductory course, but I came across a problem that I have not been able to solve.  I have successfully installed transformers on my laptop using pip, and I have tried to run your “sentiment-analysis” example using Jupyter Notebook, Spider, or Python Command Line.I am running Python 3.8.5 on Windows 10 behind a company firewall:transformersversion: 4.12.3Platform: Windows-10-10.0.19041-SP0Python version: 3.8.5PyTorch version (GPU?): not installed (NA)Tensorflow version (GPU?): 2.7.0 (False)Flax version (CPU?/GPU?/TPU?): not installed (NA)Jax version: not installedJaxLib version: not installedUsing GPU in script?: NOUsing distributed or parallel set-up in script?: NOWhen I do:from transformers import pipelineI get no errors, but when I try:classifier = pipeline(“sentiment-analysis”)I get:No model was supplied, defaulted to distilbert-base-uncased-finetuned-sst-2-english (distilbert-base-uncased-finetuned-sst-2-english · Hugging Face)HTTPSConnectionPool(host=‘huggingface.co’, port=443): Max retries exceeded with url: /distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)’)))followed by a long detailed traceback for SSLCertVerificationErrorAny advice on how to proceed?Thanks a lotMiroslaw Bartkowiak
2022-01-27T12:04:10Z
I’m also getting the same error. Please let me know if any one has resolution for this?
2022-03-18T07:45:01Z
I am getting the same error. Any help here would be much appreciated!
2023-05-22T08:42:51Z
I also have same problem.anybody solve it?
2023-12-15T17:07:57Z
Same issue while downloading LLAMA 7B.model_id='meta-llama/Llama-2-7b-hf'Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))"), '(Request ID: 0c7dac02-e1e6-4de6-a585-0e9581c4a24f)')Anyone knows how to fix this. I am on a Mac machine.
2024-02-25T12:18:33Z
Try to run this: pip install --trusted-host=pypi.org--trusted-host=files.pythonhosted.org--user pip-system-certs
2024-06-26T14:13:13Z
This worked for me! Thanks a lot!
2024-08-02T04:43:42Z
Worked! Thanks