Open abravalheri opened 1 month ago
Update: even if I invert the order between checkout
and setup-python
so that setup-python
is the very first action to run, it still fails: https://github.com/pypa/setuptools/pull/4343.
Hello @abravalheri, Thank you for creating this issue and we will look into it :)
macos-latest was recently changed from macos-13 to macos-14. macos-13 was x86_64, while macos-14 is arm64.
This action fails on macos-latest from python 3.8, 3.9, and 3.10... but seems to be okay with python 3.11.
Run actions/setup-python@v5
with:
python-version: 3.10
architecture: x64
check-latest: false
token: ***
update-environment: true
allow-prereleases: false
Installed versions
Version 3.10 was not found in the local cache
Version 3.10 is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.10.14-9004012336/python-3.10.14-darwin-x64.tar.gz"
Extract downloaded archive
/usr/bin/tar xz -C /Users/runner/work/_temp/d6bc2d46-6597-4924-9815-3d930552f60f -f /Users/runner/work/_temp/dae42830-86a3-4ec2-a5a4-02a135b36224
Execute installation script
Check if Python hostedtoolcache folder exist...
Create Python 3.10.14 folder
Copy Python binaries to hostedtoolcache folder
Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
Upgrading pip...
Error: dyld[8401]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
Referenced from: <09857011-94D0-3FBA-9F9D-9FCE0E7366FF> /Users/runner/hostedtoolcache/Python/3.
Error: 10.14/x64/bin/python3.10
Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.dylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache)
Error: ./setup.sh: line 53: 8401 Abort trap: 6 ./python -m ensurepip
Error: The process '/bin/bash' failed with exit code 134
If you're relying on packages installed by homebrew or pre-installed to the runners, then the homebrew path is different on arm64 macs, verus the x86_64. The new path is /opt/homebrew
instead of /usr/local
.
Hi @ReenigneArcher, thank you very much for having a look on this.
Yeah, I need this specifically on Python 3.8 (I did notice it work fine on 3.11).
If you're relying on packages installed by homebrew or pre-installed to the runners, then the homebrew path is different on arm64 macs, verus the x86_64. The new path is /opt/homebrew instead of /usr/local.
I don't think I am. Even when actions/setup-python@v5
is the very first step to be executed in the job, with no custom code before, it fails. I never get past actions/setup-python@v5
to have the chance to use pre-installed packages or packages installed by homebrew...
You can see more details and the workflow file in https://github.com/pypa/setuptools/pull/4343.
I don't think I am.
Sorry, I didn't mean "you"... I meant the code within the action.
I'm also experiencing the same issue as you, but wanted to share some information based other issues I've noticed with the new arm64 runners. I don't think github vetted the change to macos-14 (arm64) very well before making it the latest
. Ideally all the actions they maintain should have been compatible with new architecture out of the box.
Description: The
setup-python
action fails when installing Python 3.8 on themacos-latest
. Please note that thesetup-python
action is the second one to run, just after checkout.https://github.com/pypa/setuptools/actions/runs/8982558570/job/24670435133?pr=4329#step:3:32
Action version:
actions/setup-python@v5
- https://github.com/pypa/setuptools/actions/runs/8982558570/workflow?pr=4329#L73Platform:
Runner type:
Tools version:
Python 3.8
Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
https://github.com/pypa/setuptools/actions/runs/8982558570/job/24670435133?pr=4329#step:3:32
Expected behavior:
The
setup-python
action should successfully install Python 3.8 onmacos-latest
independently of the contents of the repository where the action is running.Actual behavior:
The
setup-python
action fails to install Python 3.8 onmacos-latest
for thesetuptools
repository.Please note that the issue is happening on the
setuptools
repository specifically, which may mean the following:setup-python
can be affected by which folders and files are present on the current working directory when the action runs...cd
into/tmp
before running the commands onsetup-python
? Or use some of the isolation flags when running Python scripts (e.g.-I
)?Also note that the suggestions in https://github.com/actions/setup-python/issues/850#issuecomment-2097496030 are not applicable. As far as I understand:
Upgrading setuptools: The suggestion to install an updated version of setuptools before the step that is failing is not feasible. The step that is failing is the installation of Python itself. Therefore, it's not possible to update anything when Python is not installed yet[^1].
Replacing setup.py with pyproject.toml: This suggestion also does not work and contains misleading and inaccurate information. The
pyproject.toml
is not more robust, it is just a different configuration format. Furthermore,setup.py
,setup.cfg
, andpyproject.toml
are not mutually exclusive; they can all exist at the same time and serve different purposes. This is exactly the case in the repository experiencing the issue.[^1]: Unless the users should always assume that the Python is pre-installed on the worker and how this affects the available actions. Please let me know if there is any documentation about this.