If you manage the proxy or SSL certificate separately, the following certificate error may occur. In this case, you can use it by specifying a trusted host in Python’s package installation tool, pip.
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:1076)'))':
How to fix this CERTIFICATE_VERIFY_FAILED
Command Line
Specify that the domain used by pip is trusted through –trusted-host on the command line.
pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org install <pakage>
Environment(config) file
The second way is through the environment(config) file used by pip.
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
When you use Visual Studio or some IDE tool you need to add config file
%APPDATA%\pip\pip.ini (Windows)
%HOME/.config/pip.conf (unix)
If you don’t have pip folder, you have to make pip folder first before make config file.
https://pip.pypa.io/en/stable/user_guide/?highlight=appdata#config-file
User Guide — pip 20.2.3 documentation
pip 20.1 included an alpha version of the new resolver (hidden behind an optional --unstable-feature=resolver flag). pip 20.2 removes that flag, and includes a robust beta of the new resolver (hidden behind an optional --use-feature=2020-resolver flag) tha
pip.pypa.io
'Python' 카테고리의 다른 글
Python - string 문자열 원하는 구분자 기준으로 나누기 (0) | 2021.06.28 |
---|---|
Python - Http Retry 및 while 을 통한 반복문 (0) | 2021.06.16 |
Python - subprocess, Popen, call차이 그리고 WorkDirectory 변경 (0) | 2021.05.24 |
Python - sqlalchemy bigint 사용한 id 값 고려 (0) | 2021.05.04 |
Django - MySQL/MariaDB 연결하기 (0) | 2021.03.24 |
댓글0