Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more
I'm trying to install Django on a windows 10 .
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
–
–
–
–
–
Setting my proxy correctly fixed this for me as well. Problem was that I used the https protocol for my HTTPS_PROXY and https_proxy environment variable.
HTTPS_PROXY=http://username:password@proxy.example.com:8080"
https_proxy=http://username:password@proxy.example.com:8080"
Do NOT use:
HTTPS_PROXY=https://username:password@proxy.example.com:8080"
https_proxy=https://username:password@proxy.example.com:8080"
–
My pip was working fine (Win7, python 3.8.6) until I upgraded pip from version 20.2.1 to 20.3.1, after which I also got the SSL: WRONG_VERSION_NUMBER error. This is reproducible, I uninstalled and reinstalled several times to confirm.
Solution (well, workaround): don't upgrade pip to 20.3.1.
Note: pip 20.3.1 works fine in my Win10/python 3.9.1 environment.
–
–
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
–
–
In case anyone still having this issue, try finding and removing OpenSSL (OS level installation), if its installed in your system.
In my case, I installed openssl on windows 10 (for some other development tasks) long time ago and forgot about it, which was the main culprit. I uninstalled it and it solved the issue
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.