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 install package== does not work in pip >= 24.1. #13015

Closed
1 task done
cederom opened this issue Oct 13, 2024 · 1 comment
Closed
1 task done

pip install package== does not work in pip >= 24.1. #13015

cederom opened this issue Oct 13, 2024 · 1 comment
Labels
C: error messages Improving error messages resolution: duplicate Duplicate of an existing issue/PR

Comments

@cederom
Copy link

cederom commented Oct 13, 2024

Description

Pip >= 24.1 does not display available versions with pip install pip==.

I hope removing install == is a bug not by design because it breaks backward compatibility and lots of scripts. I avoid JavaScript because of its self-incompatibility.. and I am really sad to see this in Python world :-(

You can also note break in version parsing:

WARNING: Error parsing dependencies of bleach: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
    tinycss2 (>=1.1.0<1.2) ; extra == 'css'

Expected behavior

As in Pip version <=24.0:

(venv3.9embedded) pip install pip==
ERROR: Ignored the following yanked versions: 20.0, 20.3.2, 21.2
ERROR: Could not find a version that satisfies the requirement pip== (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1, 1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 10.0.0b1, 10.0.0b2, 10.0.0, 10.0.1, 18.0, 18.1, 19.0, 19.0.1, 19.0.2, 19.0.3, 19.1, 19.1.1, 19.2, 19.2.1, 19.2.2, 19.2.3, 19.3, 19.3.1, 20.0.1, 20.0.2, 20.1b1, 20.1, 20.1.1, 20.2b1, 20.2, 20.2.1, 20.2.2, 20.2.3, 20.2.4, 20.3b1, 20.3, 20.3.1, 20.3.3, 20.3.4, 21.0, 21.0.1, 21.1, 21.1.1, 21.1.2, 21.1.3, 21.2.1, 21.2.2, 21.2.3, 21.2.4, 21.3, 21.3.1, 22.0, 22.0.1, 22.0.2, 22.0.3, 22.0.4, 22.1b1, 22.1, 22.1.1, 22.1.2, 22.2, 22.2.1, 22.2.2, 22.3, 22.3.1, 23.0, 23.0.1, 23.1, 23.1.1, 23.1.2, 23.2, 23.2.1, 23.3, 23.3.1, 23.3.2, 24.0, 24.1b1, 24.1b2, 24.1, 24.1.1, 24.1.2, 24.2)
ERROR: No matching distribution found for pip==

[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip

pip version

24.2

Python version

3.9.20

OS

FreeBSD

How to Reproduce

  1. Update pip to version > 24.0.
  2. Run pip install pip==.
  3. See it does not display available versions anymore.

Output

Pip 24.2 does not display versions when == is appended to a package version:

(venv3.9embedded) pip --version
pip 24.2 from /XXX/.local/venv3.9embedded/lib/python3.9/site-packages/pip (python 3.9)

(venv3.9embedded) pip install pip==
ERROR: Invalid requirement: 'pip==': Expected end or semicolon (after name and no valid version specifier)
    pip==
       ^

Pip 24.1 has this problem too:

(venv3.9embedded) pip install pip==24.1
Collecting pip==24.1
  Using cached pip-24.1-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.1
(venv3.9embedded) pip install pip==
ERROR: Invalid requirement: 'pip==': Expected end or semicolon (after name and no valid version specifier)
    pip==
       ^

Pip 24.0 works fine:

(venv3.9embedded) pip install pip==24.0
Collecting pip==24.0
  Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.0-py3-none-any.whl (2.1 MB)
WARNING: Error parsing dependencies of bleach: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier
    tinycss2 (>=1.1.0<1.2) ; extra == 'css'
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.1
    Uninstalling pip-24.1:
      Successfully uninstalled pip-24.1
Successfully installed pip-24.0

Quick workaround:

(venv3.9embedded) pip index versions pip
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
pip (24.2)
Available versions: 24.2, 24.1.2, 24.1.1, 24.1, 24.0, 23.3.2, 23.3.1, 23.3, 23.2.1, 23.2, 23.1.2, 23.1.1, 23.1, 23.0.1, 23.0, 22.3.1, 22.3, 22.2.2, 22.2.1, 22.2, 22.1.2, 22.1.1, 22.1, 22.0.4, 22.0.3, 22.0.2, 22.0.1, 22.0, 21.3.1, 21.3, 21.2.4, 21.2.3, 21.2.2, 21.2.1, 21.1.3, 21.1.2, 21.1.1, 21.1, 21.0.1, 21.0, 20.3.4, 20.3.3, 20.3.1, 20.3, 20.2.4, 20.2.3, 20.2.2, 20.2.1, 20.2, 20.1.1, 20.1, 20.0.2, 20.0.1, 19.3.1, 19.3, 19.2.3, 19.2.2, 19.2.1, 19.2, 19.1.1, 19.1, 19.0.3, 19.0.2, 19.0.1, 19.0, 18.1, 18.0, 10.0.1, 10.0.0, 9.0.3, 9.0.2, 9.0.1, 9.0.0, 8.1.2, 8.1.1, 8.1.0, 8.0.3, 8.0.2, 8.0.1, 8.0.0, 7.1.2, 7.1.1, 7.1.0, 7.0.3, 7.0.2, 7.0.1, 7.0.0, 6.1.1, 6.1.0, 6.0.8, 6.0.7, 6.0.6, 6.0.5, 6.0.4, 6.0.3, 6.0.2, 6.0.1, 6.0, 1.5.6, 1.5.5, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.1, 1.4, 1.3.1, 1.3, 1.2.1, 1.2, 1.1, 1.0.2, 1.0.1, 1.0, 0.8.3, 0.8.2, 0.8.1, 0.8, 0.7.2, 0.7.1, 0.7, 0.6.3, 0.6.2, 0.6.1, 0.6, 0.5.1, 0.5, 0.4, 0.3.1, 0.3, 0.2.1, 0.2
  INSTALLED: 24.2
  LATEST:    24.2

Code of Conduct

@cederom cederom added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Oct 13, 2024
@notatallshaw
Copy link
Member

notatallshaw commented Oct 13, 2024

Thanks for reporting but it is a duplicate of this issue: #12852

Please check the workarounds provided here: #12852 (comment)

I hope removing install == is a bug not by design because it breaks backward compatibility and lots of scripts. I avoid JavaScript because of its self-incompatibility.. and I am really sad to see this in Python world :-(

Unfortunately, the specific output of this error message was never a feature that pip supported.

@notatallshaw notatallshaw closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2024
@notatallshaw notatallshaw added resolution: duplicate Duplicate of an existing issue/PR C: error messages Improving error messages and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Oct 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: error messages Improving error messages resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants