setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Two dist-info directories for pip on macOS 11 (20230803)

Open ilia1243 opened this issue 2 years ago • 6 comments

Description

macOS 11 (20230803) has two dist-info directories installed for pip that causes its unexpected behavior.

See steps to reproduce and AR & ER below.

Platforms affected

  • [ ] Azure DevOps
  • [X] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [X] macOS 11
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

Image: https://github.com/actions/runner-images/releases/tag/macOS-11%2F20230803.1 Build: https://github.com/Netcracker/KubeMarine/actions/runs/5806754239

Is it regression?

Yes, the problem does not reproduce on previous build 20230709.1

Expected behavior

  1. Only one dist-info directory /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip-23.2.1.dist-info
  2. pip install pip==23.0 should downgrade the pip package.

Actual behavior

  1. Two dist-info directories
    /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip-23.1.2.dist-info
    /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip-23.2.1.dist-info
    
  2. pip install pip==23.0 "upgrades" the pip package to 23.2.1.

Repro steps

Synthetic job configuration:

  test-pip:
    runs-on: macos-11
    steps:
      - run: |
          find /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages -name 'pip-*.dist-info'
      - uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - run: |
          pip show pip
          pip install pip==23.0
          pip show pip

ilia1243 avatar Aug 09 '23 10:08 ilia1243

@dmitry-shibanov @MaksimZhukov could you take a look? As of build logs it looks like we bring 2 different versions of pip, one with tool cached python and one with pypy

mikhailkoliada avatar Aug 09 '23 10:08 mikhailkoliada

Hello, Just in case, the problem reproduces without usage of actions/setup-python https://github.com/Netcracker/KubeMarine/actions/runs/5808735706/job/15746138810

jobs:
  test-pip:
    runs-on: macos-11
    steps:
      - run: |
          find /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages -name 'pip-*.dist-info'
          pip3 show pip
          pip3 install pip==23.0
          pip3 show pip

AR and ER are the same.

ilia1243 avatar Aug 09 '23 12:08 ilia1243

Hello everyone! We will take a look at the issue and get back to you as soon as we have any updates

MaksimZhukov avatar Aug 10 '23 11:08 MaksimZhukov

@ilia1243 Thanks for confirming that this is happening even without using the setup-python action.

@MaksimZhukov and @mikhailkoliada it may be that this issue should be transferred back to runner-images where it was initially reported.

kurtmckee avatar Sep 15 '23 12:09 kurtmckee

Hello @kurtmckee. Thank you for your help. For now we're investigating it from our side. After that if it is needed we'll transfer it to runner-images.

dmitry-shibanov avatar Sep 15 '23 13:09 dmitry-shibanov

This is a python-specific issue, it should not belong to the runner-images repo

mikhailkoliada avatar Sep 15 '23 13:09 mikhailkoliada