setup-python
setup-python copied to clipboard
x64 python fails on arm64 images
Description: Trying to use Python-x64 on macos-14-arm64 fails
Action version: v5
Platform:
- [ ] Ubuntu
- [x] macOS
- [ ] Windows
Runner type:
- [x] Hosted
- [ ] Self-hosted
Tools version: python 3.7, 3.8, .3.9, 3.10
Repro steps:
setup-python
Expected behavior: python is set up and works
Actual behavior:
Current runner version: '2.316.0'
Operating System
macOS
14.4.1
23E224
Runner Image
Image: macos-14-arm64
Version: 20240422.3
Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240422.3/images/macos/macos-14-arm64-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240422.3
and
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-8361245787/python-3.10.14-darwin-x64.tar.gz"
Extract downloaded archive
/usr/bin/tar xz -C /Users/runner/work/_temp/a4bfbe34-2a7f-425d-9983-683cbdac49dd -f /Users/runner/work/_temp/310a98f7-3b6c-4601-95d9-d7ac120f1dac
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[3755]: 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 52: 3755 Abort trap: 6 ./python -m ensurepip
Error: The process '/bin/bash' failed with exit code 134
Hello @jvesely Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
same issue at @v4 py:3.9 3.10 os:macos-latest
I confirm I am seeing the same issue: https://github.com/neurodata/scikit-tree/actions/runs/8895864721/job/24427188361?pr=264
Is there any temporary fix? Does downgrading to v4 work?
Hi. @aparnajyothi-y reported at https://github.com/actions/setup-python/issues/825#issuecomment-2012392172 (thanks!):
We have reproduced the error in our local and found that the error is due to
python<3.10
versions are not added tomacos-14
runner image.
macos-14
aka. macos-latest
has switched to being an ARM runner, only supporting newer versions of Python. If you need to support older versions, you may want to switch to macos-13
.
- https://github.com/crate/cratedb-examples/pull/447
Hi. @aparnajyothi-y reported at #825 (comment) (thanks!):
We have reproduced the error in our local and found that the error is due to
python<3.10
versions are not added tomacos-14
runner image.
macos-14
aka.macos-latest
has switched to being an ARM runner, only supporting newer versions of Python. If you need to support older versions, you may want to switch tomacos-13
.
FYI: The problem seems to also happen with more recent versions, e.g. python 3.12:
Build: https://github.com/sciunto-org/python-bibtexparser/actions/runs/9140004908/job/25132899238?pr=484
Hello Everyone, The actions/setup-python repository does not support x64 packages for Python <3.11 version on macOS arm64 runners due to compatibility and build issues. The build process for Python versions less than 3.11 involves downloading the official Python sources from python.org and building them using the make tool on the oldest available version of macOS that was available when that Python version was released. This is done to ensure backward compatibility for those Python versions as mentioned in this python-versions documentation. However, this build process can run into compatibility issues on macOS arm64 runners. The arm64 architecture is used in Apple's newer Mac models that use Apple Silicon processors, which are based on a different instruction set than the x86-64 processors used in older models. Therefore, the built Python packages for versions less than 3.11 may trigger the issues like few modules missing on macOS arm64 runners. This is why the actions/setup-python repository does not support x64 packages for <Python 3.11 versions on macOS arm64 runners. For Python versions 3.11 and onwards, the actions/setup-python repository uses the official macOS universal2 Python binaries from python.org, which are compatible with both x86-64 and arm64 architectures. These can be used on macOS arm64 runners without any issues. For Arm64 platform, we use official macOS universal2 Python binaries and provide only versions which are provided by Python org. Hence we are closing this issue as x64 packages for < python 3.11 from source will not be supported by macos arm64 runners. Please feel free to reach us needed to reopen this issue for more clarifications.