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

Upgrade pip using pip.exe raises an error if the requirement already satisfied #6924

Closed
atugushev opened this issue Aug 26, 2019 · 2 comments · Fixed by #6928
Closed

Upgrade pip using pip.exe raises an error if the requirement already satisfied #6924

atugushev opened this issue Aug 26, 2019 · 2 comments · Fixed by #6928
Assignees
Labels
auto-locked Outdated issues that have been locked by automation state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior

Comments

@atugushev
Copy link
Contributor

Environment

  • pip version: 19.3.dev0, master since d2b7082
  • Python version: any
  • OS: Windows

Description

Currently modifying pip on Windows using pip.exe raises an error and suggests to upgrade it using module invocation python -m pip install ...:

ERROR: To modify pip, please run the following command:
C:\Python36\python.exe -m pip install --upgrade pip

But if the requirement is already satisfied or up-to-date it still raises the same error:

Requirement already satisfied: pip in c:\python36\lib\site-packages (19.3.dev0)
ERROR: To modify pip, please run the following command:
C:\Python36\python.exe -m pip install pip

Expected behavior

The command shouldn't raise the error if the requirement is up-to-date:

> pip install pip
Requirement already satisfied: pip in c:\python36\lib\site-packages (19.3.dev0)

How to Reproduce

  1. Get package from git+git://github.com/pypa/pip@d2b708#egg=pip
  2. Then run pip install pip
  3. An error occurs.

Output

> python -m pip install --upgrade git+git://github.com/pypa/pip@master#egg=pip==19.3.dev0
Collecting pip==19.3.dev0 from git+git://github.com/pypa/pip@master#egg=pip==19.3.dev0
  Cloning git://github.com/pypa/pip (to revision master) to c:\users\appveyor\appdata\local\temp\1\pip-install-t406pky0\pip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
  Running setup.py install for pip: started
    Running setup.py install for pip: finished with status 'done'
Successfully installed pip-19.3.dev0

> pip install pip
Requirement already satisfied: pip in c:\python36\lib\site-packages (19.3.dev0)
ERROR: To modify pip, please run the following command:
C:\Python36\python.exe -m pip install pip

Additional context

This issue came out of the discussion in PR #6864 (comment).

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Aug 26, 2019
@chrahunt chrahunt added state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior labels Aug 26, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Aug 26, 2019
@atugushev
Copy link
Contributor Author

atugushev commented Aug 26, 2019

@chrahunt could you please assign this issue to me, i'd like to work on it?

@chrahunt
Copy link
Member

Done!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation state: awaiting PR Feature discussed, PR is needed type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants