-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Failure to find Python binary on MacOS GitHub runner #1785
Comments
I've modified the workflow to only run on Mac and Python versions 3.9 - 3.13. It fails on all of them. cat "/Users/runner/Library/Application Support/pyapp/hatch/15969350296226343517/1.13.0/python/bin/hatch" Output
|
I guess, the assumption that the Python binary is in the same directory as the hatch binary does not hold here. |
Could you please show me the contents of that directory? |
Now it gets interesting... 😖
|
Could it be the space in the filepath, and you need to have the following line instead? "exec" "$(dirname "$0")/python3.12" "$0" "$@" |
At least, this short test makes a big difference: #!/usr/bin/env sh
path='/some/fake/path with/a/space'
echo "$(dirname $path)"
echo "$(dirname "$path")" output
but I do not see really see this outcome in the GitHub error message. |
Hi @ofek, I have tried a few more things like completely remove the uv installer also from the default environment and remove the pip-compile plugin, but I still get the same error. I have now made the repo public and you can inspect all the failed runs on the https://github.com/Midnighter/knowledge-chat/actions |
Hello,
I ran into the below error with running a command in a hatch environment. It happens to me on MacOS runners with Python 3.12 and 3.13 (I will test other versions, too). It happens both with
pip
oruv
as the installer.With
pip
installerWith
uv
installerThe environment itself is detached and defined as follows:
I'm using the same on several other projects and have not seen this issue before.
The workflow is defined as:
The text was updated successfully, but these errors were encountered: