最近在mac电脑上,通过pip安装python依赖的一个rembg的库,遇到了一下网络连接的sll的问题:
There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/yacs/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))
最后通过寻找各种解决方案,得到了快速的解决方案如下:
1.需要增加一个pip的一个配置,并且将信任的站点配置成全局位置。
2.MacOs配置文件位置$HOME/Library/Application Support/pip/pip.conf
3.vim打开pip.conf文件,将一下host信息写入,保存退出,问题马上解决了
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org