-
Notifications
You must be signed in to change notification settings - Fork 586
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 3.12 is not symlinked to Python on macOS 12.6.7 (macos-latest) #701
Comments
This caught my eye because of #684 and got nerd sniped 🤓 I think this is happening because the of the following setting in the workflow definition defaults:
run:
shell: bash -el {0} Each step is getting its own login shell which doesn't seem to respect the changes made from actions/setup-python Its not clear to me as to why it works for 3.11 but not 3.12. since the environment seems to get setup the same way across the login/non-login shells. purely speculation but perhaps there's an issue with how versions not installed in hostedtoolcache are setup that differs here. I updated my runner reference workflow for python to try and debug why this is happening. Some of the info is split up among the summary values for each job and the actual log output. Sorry bout that 😅 If there's no other reason for needing the login shell then it might be easier just to change that since this seems like another https://xkcd.com/1987 lol. Path in a step with login shell after setup-python# path when default shell is set to `bash -el {0}`
# formatted for readability. each segment on newline
PATH=/usr/local/lib/ruby/gems/3.0.0/bin:
/usr/local/opt/[email protected]/bin:
/usr/local/opt/pipx_bin:
/Users/runner/.cargo/bin:
/usr/local/opt/curl/bin:
/usr/local/bin:
/usr/local/sbin:
/Users/runner/bin:
/Users/runner/.yarn/bin:
/Users/runner/Library/Android/sdk/tools:
/Users/runner/Library/Android/sdk/platform-tools:
/Library/Frameworks/Python.framework/Versions/Current/bin:
/Library/Frameworks/Mono.framework/Versions/Current/Commands:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/Library/Apple/usr/bin:
/Library/Frameworks/Mono.framework/Versions/Current/Commands:
/Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/bin:
/Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64:
/usr/local/lib/ruby/gems/3.0.0/bin:
/usr/local/opt/[email protected]/bin:
/usr/local/opt/pipx_bin:
/Users/runner/.cargo/bin:
/usr/local/opt/curl/bin:
/usr/local/sbin:
/Users/runner/bin:
/Users/runner/.yarn/bin:
/Users/runner/Library/Android/sdk/tools:
/Users/runner/Library/Android/sdk/platform-tools:
/Library/Frameworks/Python.framework/Versions/Current/bin:
/Users/runner/.dotnet/tools:
/Users/runner/.ghcup/bin:
/Users/runner/hostedtoolcache/stack/2.11.1/x64:
/Users/runner/.dotnet/tools:
/Users/runner/.ghcup/bin:
/Users/runner/hostedtoolcache/stack/2.11.1/x64 Path in a step without login shell after setup-python# path when default shell is set to `bash`
PATH=/Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/bin:
/Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64:
/usr/local/lib/ruby/gems/3.0.0/bin:
/usr/local/opt/[email protected]/bin:
/usr/local/opt/pipx_bin:
/Users/runner/.cargo/bin:
/usr/local/opt/curl/bin:
/usr/local/bin:
/usr/local/sbin:
/Users/runner/bin:
/Users/runner/.yarn/bin:
/Users/runner/Library/Android/sdk/tools:
/Users/runner/Library/Android/sdk/platform-tools:
/Library/Frameworks/Python.framework/Versions/Current/bin:
/Library/Frameworks/Mono.framework/Versions/Current/Commands:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/Users/runner/.dotnet/tools:
/Users/runner/.ghcup/bin:
/Users/runner/hostedtoolcache/stack/2.11.1/x64 ![]() but why does it work on 3.11?curiously seems to work but suffers the same problem? ![]() with login shell macos12 setup-python 3.11$ type -a python
python is /usr/local/bin/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python
python is /usr/local/bin/python
python is /Users/runner/hostedtoolcache/Python/3.11.4/x64/bin/python
python is /Users/runner/hostedtoolcache/Python/3.11.4/x64/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python without login shell macos12 setup-python 3.11$ type -a python
python is /Users/runner/hostedtoolcache/Python/3.11.4/x64/bin/python
python is /Users/runner/hostedtoolcache/Python/3.11.4/x64/python
python is /usr/local/bin/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python with login shell macos12 setup-python 3.12$ type -a python
python is /usr/local/bin/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python
python is /usr/local/bin/python
python is /Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/bin/python
python is /Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python without login shell macos12 setup-python 3.12type -a python
python is /Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/bin/python
python is /Users/runner/hostedtoolcache/Python/3.12.0-beta.4/x64/python
python is /usr/local/bin/python
python is /Library/Frameworks/Python.framework/Versions/Current/bin/python |
Hello @lithomas1. Thank you for your report. We'll take a look at this issue. |
Hello everyone. Sorry for the late response. It looks like an expected behaviour because For now I'm going to close the issue. |
Description:
A clear and concise description of what the bug is.
Python 3.12 is not symlinked to
python
on macOS 12.6.7 (macos-latest).Instead,
python
points to the Python 2.7 that comes with macOSAction version:
actions/setup-python@v4
Platform:
Runner type:
Tools version:
Python 3.12-dev (3.12.0-beta4)
Repro steps:
See this workflow
https://github.com/pandas-dev/pandas/actions/runs/5555915106/jobs/10147721442?pr=53743
Expected behavior:
python
should point to Python 3.12Actual behavior:
python
points to the Python 2.7 that comes with macOSThe text was updated successfully, but these errors were encountered: