内网下载huggingface模型报错 HTTPSConnectionPool(host=‘huggingface.co‘, port=443): Max retries exceeded with

参考这个解法 https://stackoverflow.com/questions/71692354/facing-ssl-error-with-huggingface-pretrained-models

Downgrading requests to 2.27.1 and adding the following code snippet to the beginning of your program file should fix the problem.

'''This following code will set the CURL_CA_BUNDLE environment variable to an empty string in the Python os module'''

import os
os.environ['CURL_CA_BUNDLE'] = ''

你可能感兴趣的:(ubuntu)