PYTHON pip install fails with “connection error: [SSL: CERTIFICATE_VERIFY_FAILED]

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)'))': 


Command Line

Specify that the domain used by pip is trusted through –trusted-host on the command line.

pip --trusted-host --trusted-host --trusted-host install <pakage>

Environment(config) file

The second way is through the environment(config) file used by pip.

trusted-host =

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.

Facebook Comments

Leave A Reply

Detection ADBlockPlease, Disable or add to white list on our site.