Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip 20.3 https://pypi.org SSLError WRONG_VERSION_NUMBER #9223

Closed
SandorSzalma1 opened this issue Dec 4, 2020 · 6 comments
Closed

pip 20.3 https://pypi.org SSLError WRONG_VERSION_NUMBER #9223

SandorSzalma1 opened this issue Dec 4, 2020 · 6 comments
Labels
project: vendored dependency Related to a vendored dependency resolution: duplicate Duplicate of an existing issue/PR

Comments

@SandorSzalma1
Copy link

SandorSzalma1 commented Dec 4, 2020

Environment

  • pip version: 20.3
  • Python version: 3.8.5
  • OS: Windows 10

Description
pip install ibm_db does not work anymore as https://pypi.org cannot be reached anymore:

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:1123)'))': /simple/ibm-db/

Expected behavior
the packages can be installed without issue
with pip version 20.2.4 it works fine

How to Reproduce

conda create -n xxx python=3.8 pip
conda activate xxx
pip install ibm_db --verbose

Output

* https://pypi.org/simple/ibm-db/
Fetching project page and analyzing links: https://pypi.org/simple/ibm-db/
Getting page https://pypi.org/simple/ibm-db/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/ibm-db/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
Incremented Retry for (url='/simple/ibm-db/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
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:1123)'))': /simple/ibm-db/
@SandorSzalma1
Copy link
Author

SandorSzalma1 commented Dec 4, 2020

Traceback (most recent call last):
  File "C:\Users\xyz\.conda\envs\tobi\lib\site-packages\pip\_internal\cli\base_command.py", line 210, in _main
    status = self.run(options, args)
  File "C:\Users\xyz\.conda\envs\tobi\lib\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "C:\Users\xyz\.conda\envs\tobi\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
    requirement_set = resolver.resolve(
  File "C:\Users\xyz\.conda\envs\tobi\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 127, in resolve
    six.raise_from(error, e)
  File "<string>", line 3, in raise_from
pip._internal.exceptions.DistributionNotFound: No matching distribution found for ibm_db

@zhe0
Copy link

zhe0 commented Dec 10, 2020

I got same issue too. Many of package were not able install and only install from download as zip.

Environment:
pip version: 20.3
Python version: 3.9.1
OS: Windows 10

@akern40
Copy link

akern40 commented Dec 14, 2020

I've also got the same issue, trying to install ax-platform:

Environment

pip version: 20.3.1
Python version: 3.7.9
OS: Windows 10

@julianebeli
Copy link

julianebeli commented Dec 15, 2020

I got the same error as the original person @SandorSzalma1

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/

pip version 20.3.1 (and 20.3)
Python version 3.8.3
Windows 10 (1909)

Rolled back to pip 20.2.4

@quannm3110
Copy link

It is the bug from pip version 20.3.x (I had problem with both 20.3.1 and 20.3.3). Rolled back to pip 20.2.4 as suggested by @julianebeli will fix the problem.

Just one point to add here is how to roll back to 20.2.4 which is also quite tricky since you can not run pip install pip==20.2.4. What I did was running the following command python -m ensurepip --default-pip to get back to default pip version (this default version was already okay for my case). After that, you can upgrade it to whatever version as you wish.

Hope this help.

@uranusjr
Copy link
Member

This is not a bug. pip (actually urllib3 underneath) is now more strict on how a proxy is configured. Closing this as a duplicate of #9216 so people know where to look when they encounter this particular error.

Also see:

@uranusjr uranusjr added project: vendored dependency Related to a vendored dependency resolution: duplicate Duplicate of an existing issue/PR labels Dec 29, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
project: vendored dependency Related to a vendored dependency resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

6 participants