-
Notifications
You must be signed in to change notification settings - Fork 573
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
Difference between env.pythonLocation on macOS in Python 3.11+ #813
Comments
Hello @adamjstewart |
Hello @adamjstewart, Thank you for creating this issue once again. |
Hello @adamjstewart, We have investigated furthermore on this and found that there is difference in building installation packages before and after python 3.11 in actions/python-versions which setup-python uses to build the packages.
For Python >= 3.11:
|
@aparnajyothi-y Does |
Hello @adamjstewart, Please react out us incase of any other concerns :) |
Great, so then this is a bug in how |
Hi @adamjstewart, The environment variable 'env.pythonLocation' is utilized by the 'actions/setup-python' action to indicate the installation location of the desired Python or PyPy version. This helps subsequent workflow steps to find and use the Python executable. Regarding Python 3.11+, there is no modification in the usage of 'env.pythonLocation'. It continues to reference the Python interpreter's installation location. Any new features or alterations in Python 3.11+ would pertain to the Python build process itself, not directly to the 'env.pythonLocation' variable or the 'actions/setup-python' action. Therefore, we cannot implement any fixes related to 'env.pythonLocation' for Python 3.11+ versions. |
The directory indicated by |
Hello @adamjstewart, We have further investigated the env.pythonLocation functionality and it is pointing to the installation location of the desired Python or PyPy version. The directory indicated by env.pythonLocation on macOS for Python 3.11+ contains ~0 MB (534 B) of data is due to the changes in the official python build process itself and no changes from setup-python. |
It is pointing to an empty directory.
It seems like the solution would be to change setup-python so that it correctly handles this new build process?
In that case, I would like to request a feature that points to the installation directory of Python. |
Since the switch from macos-13 (x86_64) to macos-14 (arm64) this week, I'm not seeing this bug in Python 3.10 as well: https://github.com/microsoft/torchgeo/actions/runs/8837018251/job/24264909202?pr=2023. |
Description:
I'm encountering a strange issue related to caching the Python installation. I'm using
actions/setup-python@v5.0.0
to install Python, thenactions/cache@v4.0.0
to cache theenv.pythonLocation
directory, similar to this blog.This works fantastically, except on macOS in Python 3.11 and 3.12, and I have no idea why. For some reason, the cache is empty, but only for those specific versions. Did anything change in the installation layout or
env.pythonLocation
variable that could explain this?Action version:
5.0.0
Platform:
Runner type:
Tools version:
Python 3.11, 3.12
Repro steps:
The full workflow can be seen here.
Expected behavior:
I would expect this to work for all platforms/Python versions and cache the installed Python packages.
Actual behavior:
The cache is empty. See actions/cache#1176 for the cross-referenced bug report.
The text was updated successfully, but these errors were encountered: