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 --upgrade pip on v22.0 broken on windows #10848

Closed
1 task done
banesullivan opened this issue Jan 30, 2022 · 3 comments · Fixed by #10560
Closed
1 task done

pip install --upgrade pip on v22.0 broken on windows #10848

banesullivan opened this issue Jan 30, 2022 · 3 comments · Fixed by #10560
Labels
OS: windows Windows specific type: bug A confirmed bug or unintended behavior

Comments

@banesullivan
Copy link

banesullivan commented Jan 30, 2022

Description

pip install --upgrade pip is failing on windows GitHub actions runners with v22.0

See pyvista/pyvista#2113

See example workflow shared below

See https://github.com/pyvista/pyvista/runs/4998090770?check_suite_focus=true#step:4:1

Expected behavior

Pip should be able to upgrade itself on windows for Python 3.7 and greater

pip version

22.0

Python version

3.7+

OS

Windows

How to Reproduce

Use this GitHub Actions workflow:

name: Unit Testing

on:

jobs:
  windows:
    name: Windows Unit Testing
    runs-on: windows-2019
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.6, 3.7, 3.8, 3.9]
    steps:
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Upgrade pip
        run: pip install --upgrade pip

Output

pip install --upgrade pip
  pip install --upgrade pip
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    ALLOW_PLOTTING: true
    SHELLOPTS: errexit:pipefail
    CI_WINDOWS: true
    pythonLocation: C:\hostedtoolcache\windows\Python\3.7.9\x64
Requirement already satisfied: pip in c:\hostedtoolcache\windows\python\3.7.9\x64\lib\site-packages (21.3.1)
Collecting pip
  Downloading pip-22.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\pip-uninstall-2ea7t7u5\\pip.exe'
Consider using the `--user` option or check the permissions.

Error: Process completed with exit code 1.

Code of Conduct

@banesullivan banesullivan added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jan 30, 2022
This was referenced Jan 30, 2022
@pradyunsg
Copy link
Member

You'll want to run python -m pip ... for that. I'm not sure why pip's detection logic is broken on Windows, since we'd added a dedicated warning to detect this situation.

@banesullivan
Copy link
Author

Thanks for the tip!!

Also, I want to make sure it's clear in my issue that this broke on v22 but works fine on v21

@pradyunsg pradyunsg added OS: windows Windows specific and removed S: needs triage Issues/PRs that need to be triaged labels Jan 30, 2022
@RoDuth
Copy link

RoDuth commented Jan 31, 2022

Noticed something very similar today on MinGW x64. This had also worked until upgrading from v21 to v22.

$ pip install --upgrade pip
Requirement already satisfied: pip in c:/msys64/mingw64/lib/python3.9/site-packages (21.3.1)
Collecting pip
  Downloading pip-22.0.2-py3-none-any.whl (2.1 MB)
     |################################| 2.1 MB 3.3 MB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:/Users/test/AppData/Local/Temp/pip-uninstall-bau5mi39\\pip.exe'
Consider using the `--user` option or check the permissions.

seems the path C:/Users/test/AppData/Local/Temp/pip-uninstall-bau5mi39\\pip.exe is mangled, mixing Windows and POSIX path separators

RoDuth added a commit to RoDuth/ghini.desktop that referenced this issue Jan 31, 2022
Seems `pip install --upgrade pip` now fails.
pypa/pip#10848
RoDuth added a commit to RoDuth/ghini.desktop that referenced this issue Jan 31, 2022
Seems `pip install --upgrade pip` now fails.
pypa/pip#10848
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Feb 1, 2022
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Feb 1, 2022
QuLogic added a commit to QuLogic/matplotlib that referenced this issue Feb 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OS: windows Windows specific type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants