SSLError使用pip安装 [英] SSLError installing with pip
问题描述
我正在尝试在Windows 10上安装Django.
I'm trying to install Django on a windows 10 .
无论我尝试在cmd上使用pip进行安装,都会遇到这些错误
Whatever I try to install with pip on cmd, I get those errors
Collecting django
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))': /simple/django/
Could not fetch URL https://pypi.org/simple/django/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/django/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))) - skipping
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)'))) - skipping
我从其他问题中尝试了很多方法,但是没有任何效果.
I've tried a lot of things from other questions but none is working.
pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org django
推荐答案
我问了一个自动知道该怎么做的同事.我只需要设置代理变量:设置https_proxy = http://username:password@proxy.example.com:8080 "设置http_proxy = http://username:password@proxy.example.com:8080 "而且有效
I asked a collegue who automatically knew what to do. I just had to set the proxy variables: "set https_proxy=http://username:password@proxy.example.com:8080" "set http_proxy=http://username:password@proxy.example.com:8080" and it works
这篇关于SSLError使用pip安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!