Closed tstellar closed 2 days ago
Hi @tstellar, We are looking in to it.
Hi @tstellar,
We could see the above behaviour only for ARM64 based images. We will check more on it and keep you posted on our investigation. Currently, you can use the below two solutions to continue with our ARM64 images.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install PyGithub
run: |
pip install pygithub
python3 -c 'import github'
steps:
- name: Install PyGithub
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install pygithub
python3 -c 'import github'
Hi @tstellar ,
We have two installations of Python here. One is via Homebrew and the other is via the official Python.org installer.
When we run "pip install pygithub" initially, it invokes the pip installed by the Python.org installer and downloads to the location - "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages"
pip --version
ARM : pip 24.2 from /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip (python 3.12)
When we run "python3 -c import github" following it, it considers the pip which is installed by the homebrew now.
python3 -m pip --version
ARM : pip 24.0 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12)
Since python3 used above is installed using Homebrew and Homebrew doesn't directly manage installation of pygithub
we suggest using the above two options (setup-python actions / using virtual environment) to resolve the same.
Description
It appears that the default pip binary and default python3 binary on the macos-14 runners use different python installs. So any python modules you install via pip are cannot be found by python3.
Platforms affected
Runner images affected
Image version and build link
Runner Version: 20240728.1
https://github.com/tstellar/llvm-project/actions/runs/10223278047/job/28289331074
Is it regression?
Yes, it was working with 20240722.3
Expected behavior
Python3 should be able to import modules installed via pip.
Actual behavior
Repro steps
You can reproduce the problem with this workflow: