-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Python CLI Tools Installing Inside Python Framework on macOS-12 #6507
Comments
I'm seeing the same thing with
One of my CI jobs is scheduled to run every day. Last time it worked, the runner image was |
I bet this will fix the image: I held off on a PR since the Contribution guide said macOS external contributions aren't supported, but let me know if you want me to make one. |
Hi @aetherealtech and @ssrobins thank you for reporting and contributing, we will check it and get back to you. |
* lestarch: bumping zmq and GDS versions * lestarch: adding `wheel` to setup * lestarch: checking tools before leaving action * lestarch: reverting to mac11 runners See: actions/runner-images#6507
Please give top priority to this, we need to issue a patch on iOS ASAP |
Our recommendation is to use setup-python action - https://github.com/actions/setup-python |
Thanks @al-cheb team sends you a hug! |
… on macOS This way each time a new Python version is installed via Homebrew , we don't get CI failures due to the upstream Python distribution also being installed. Ref: actions/runner-images#6459 Ref: actions/runner-images#6507 Ref: actions/runner-images#2322
… on macOS This way each time a new Python version is installed via Homebrew , we don't get CI failures due to the upstream Python distribution also being installed. Ref: actions/runner-images#6459 Ref: actions/runner-images#6507 Ref: actions/runner-images#2322
We currently use any system-installed Python version to invoke the wheel building process (which then happens inside a container). The exact Python version does not matter, but it must be a working Python version -- and that's currently not the case for the macos11 builds: Python and the Python installation directory are not inside PATH, hence we install nox, but it's not found in the next step. actions/runner-images#6518 fixes the problem, but is not yet rolled out universally. It seems like using setup-python even for this case is recommended (actions/runner-images#6507 (comment)), so let's do that.
We currently use any system-installed Python version to invoke the wheel building process (which then happens inside a container). The exact Python version does not matter, but it must be a working Python version -- and that's currently not the case for the macos11 builds: Python and the Python installation directory are not inside PATH, hence we install nox, but it's not found in the next step. actions/runner-images#6518 fixes the problem, but is not yet rolled out universally. It seems like using setup-python even for this case is recommended (actions/runner-images#6507 (comment)), so let's do that.
We currently use any system-installed Python version to invoke the wheel building process (which then happens inside a container). The exact Python version does not matter, but it must be a working Python version -- and that's currently not the case for the macos11 builds: Python and the Python installation directory are not inside PATH, hence we install nox, but it's not found in the next step. actions/runner-images#6518 fixes the problem, but is not yet rolled out universally. It seems like using setup-python even for this case is recommended (actions/runner-images#6507 (comment)), so let's do that.
Because of actions/runner-images#6507 (comment) Installing and running Python packages is no longer straightforward Even with a temporary fix, rclpy was no longer building on MacOS
Because of actions/runner-images#6507 (comment) Installing and running Python packages is no longer straightforward Even with a temporary fix, rclpy was no longer building on MacOS
Deployed |
Related: * macos-latest can currently be associated with either macos-11 or macos-12, so pinned it for the moment --> https://github.blog/changelog/2022-10-03-github-actions-jobs-running-on-macos-latest-are-now-running-on-macos-12/ * Update checkout actions and setup python actions versions * Tools not installed in PATH locations: actions/runner-images#6507 * Explicit export workaround for the only case that seems to fail (for PATH not found reasons): add PATH missing to PATH if os is macos-12 (the one pinned) and running Python 3.11
The github mac runner images added python 3.11 but, unlike 3.10, not via brew. This causes brew install to fail with link conflict errors now that boost-python3 switched over to 3.11. Workaround this, and future python brew link errors, by ovewriting all links for python packages. Homebrew/homebrew-core@8c79089 https://github.com/orgs/Homebrew/discussions/3895 actions/setup-python#577 actions/runner-images#6459 actions/runner-images#6507 actions/runner-images#2322
The github mac runner images added python 3.11 but, unlike 3.10, not via brew. This causes brew install to fail with link conflict errors now that boost-python3 switched over to 3.11. Workaround this, and future python brew link errors, by overwriting all links for python packages. Homebrew/homebrew-core@8c79089 https://github.com/orgs/Homebrew/discussions/3895 actions/setup-python#577 actions/runner-images#6459 actions/runner-images#6507 actions/runner-images#2322
The github mac runner images added python 3.11 but, unlike 3.10, not via brew. This causes brew install to fail with link conflict errors now that boost-python3 switched over to 3.11. Workaround this, and future python brew link errors, by overwriting all links for python packages. Homebrew/homebrew-core@8c79089 https://github.com/orgs/Homebrew/discussions/3895 actions/setup-python#577 actions/runner-images#6459 actions/runner-images#6507 actions/runner-images#2322
… on macOS This way each time a new Python version is installed via Homebrew , we don't get CI failures due to the upstream Python distribution also being installed. Ref: actions/runner-images#6459 Ref: actions/runner-images#6507 Ref: actions/runner-images#2322
… on macOS This way each time a new Python version is installed via Homebrew , we don't get CI failures due to the upstream Python distribution also being installed. Ref: actions/runner-images#6459 Ref: actions/runner-images#6507 Ref: actions/runner-images#2322
Description
We have a GitHub Action that installs codemagic-cli-tools using the following shell command:
pip3 install codemagic-cli-tools
This is supposed to add several CLI programs to the path (installing them to
usr/local/bin
). We use one of them,app-store-connect
, later in the action.This script broke somewhere between 6 and 1 days ago (the last successful run was on 10/27, around 23:30 UTC, first failed run was yesterday), with the failure:
app-store-connect: command not found
After running some tests, we determined that none of the CLI tools that are supposed to be added are present in
usr/local/bin
. There was an update tocodemagic-cli-tools
on the first failed run, so we tried using the exact same version, and the error persisted.After some more investigation, we noticed that on the last successful run, the python CLI was referenced as simply
python3.10
, but on the failing runs, it is referenced by the full path:/Library/Frameworks/Python.framework/Versions/3.11/bin/python
So then we looked into the following directory:
/Library/Frameworks/Python.framework/Versions/3.11/bin
And we found the CLI tools installed there.
We tried running them from there, and got a bunch of Python errors, but that may be a problem with those tools.
However, it seems like the latest macos runner that upgraded Python from 3.10.8 to 3.11 resulted in something about the paths getting messed up for Python.
Last successful run: https://github.com/movehq/hq-driver-ios/actions/runs/3341642377/jobs/5533052139
First failing run: https://github.com/movehq/hq-driver-ios/actions/runs/3370254410/jobs/5590925123
Platforms affected
Runner images affected
Image version and build link
https://github.com/actions/runner-images/blob/macOS-12/20221027.1/images/macos/macos-12-Readme.md
Is it regression?
https://github.com/actions/runner-images/blob/macOS-12/20221018.2/images/macos/macos-12-Readme.md
Expected behavior
CLI tools installed by this Python library should be in
usr/local/bin
, so they are in the shell path.Actual behavior
CLI tools are installed to
/Library/Frameworks/Python.framework/Versions/3.11/bin
, and not in the shell path.Repro steps
Run the following script in a GitHub Action:
The text was updated successfully, but these errors were encountered: