pip 安装失败报错如下
demo: > pip install beautifulsoup4
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:1000)'))': /packages/b1/fe/e8c672695b37eecc5cbf43e1d0638d88d66ba3a44c4d321c796f4e59167f/beautifulsoup4-4.12.3-py3-none-any.whl.metadata
解决方案:
安装的时候添加两个参数
pip install beautifulsoup4 --trusted-host pypi.org --trusted-host files.pythonhosted.org
# 可能会出现超时的情况,如果超时就重试一下基本上能解决问题