Can't use pip: SSL wrong version number

Hello,

I can't use pip, I get an SSL wrong version number error message in PyCharm terminal:

(venv) C:\Users\ASUS-R900V\Documents\python\pythonProject3>pip --version
pip 21.1.3 from c:\users\asus-r900v\documents\python\pythonproject3\venv\lib\site-packages\pip (python 3.8)

(venv) C:\Users\ASUS-R900V\Documents\python\pythonProject3>pip list
Package Version
---------- -------
pip 21.1.3
setuptools 57.2.0
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 ex
ceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1108)'))) - skipping

(venv) C:\Users\ASUS-R900V\Documents\python\pythonProject3>

When I go to File > Settings > (project) > Available packages, and try to install a specific version of pip, it times out and I get "Error occured while installing package 'pip'. Details:"

Executed command: pip install pip==19.2
Error occured: ERROR: Could not find a version that satisfies the requirement pip==19.2 (from versions: none)

Proposed solution: Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\ASUS-R900V\Documents\python\pythonProject3\venv\Scripts\python.exe'.

Command output:

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

WARNING: 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:1108)'))': /simple/pip/
WARNING: 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:1108)'))': /simple/pip/
WARNING: 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:1108)'))': /simple/pip/
WARNING: 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:1108)'))': /simple/pip/
WARNING: 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:1108)'))': /simple/pip/
ERROR: Could not find a version that satisfies the requirement pip==19.2 (from versions: none)
ERROR: No matching distribution found for pip==19.2

I searched on this forum and on StackOverflow, tried many different suggestions, installed OpenSSL, but to no avail. I have Windows 10, PyCharm 2021.1.3 Professional Edition. I don't have this problem with VSC. Could you help me, please?

 

Please sign in to leave a comment.