Skip to content
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.10 not available on new macOS M1 runners #808

Closed
agriyakhetarpal opened this issue Jan 31, 2024 · 11 comments
Closed

Python <3.10 not available on new macOS M1 runners #808

agriyakhetarpal opened this issue Jan 31, 2024 · 11 comments
Labels
feature request New feature or request to improve the current logic

Comments

@agriyakhetarpal
Copy link

agriyakhetarpal commented Jan 31, 2024

Description:
Hello, we are trying to use setup-python with 3.8 and 3.9 on the new GitHub Actions macOS M1 runners (i.e., runs on: macos-14). It does not appear to have Python 3.8 and 3.9 and the oldest darwin-arm64 Python version available in the manifest is Python 3.10.11.

Justification:
Python 3.8 will not be EOLed until September/October this year, and Python 3.9 will be EOLed in 2025 therefore it should be a good idea to support these older Python versions, considering that they are supported on the darwin-x86_64 runner currently.

Are you willing to submit a PR?

I can try, thanks!


Edit, 24/04/2024: at the time of writing, macos-latest now points to M1 arm64 runners (the architecture has changed) and this is being rolled out to GitHub Actions users. macos-13 and macos-12 still use amd64 (Intel).

For those looking for a quick workaround at this time, just exclude these from your matrices:

    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
        runs-on: [ubuntu-latest, macos-13, macos-14, windows-latest]
        exclude:
          - python-version: "3.8"
            runs-on: macos-14
          - python-version: "3.9"
       		runs-on: macos-14
@HarithaVattikuti
Copy link
Contributor

Hello @agriyakhetarpal
Thank you for creating this feature request. We will investigate it and get back to you as soon as we have some feedback.

@mayeut
Copy link
Contributor

mayeut commented Feb 2, 2024

actions/python-versions#214 enabled 3.8 & 3.9 for macOS arm64. It's probably a matter of starting the builds there ?

EliahKagan added a commit to EliahKagan/GitPython that referenced this issue Feb 6, 2024
Some versions of Python do not currently have builds available via
actions/setup-python for the Apple Silicon M1 (64-bit ARM) runner
used for macos-14. This excludes those.

- Python 3.7 is EoL and builds for it are no likely to be provided
  for newly available platforms on GitHub Actions.

- Python 3.8 and 3.9 are still supported by the Python Software
  Foundation. Builds for them are not currently avaialable on the
  GHA M1 runners, but it appears this may not be intentional. See
  actions/setup-python#808. If those
  versions become available, then they can be reenabled.

- Later versions of Python are available.
hiroyuki-komatsu pushed a commit to google/mozc that referenced this issue Feb 6, 2024
This is a follow up commit to my previous commit [1], which upgraded
GitHub Actions runner for macOS builds to 'macos-14' (#868).

While we still support Python 3.9 to build Mozc on macOS environment,
currently we cannot use 'setup-python' to set up Python 3.9 in
'macos-14' runner [2]. Also we don't use 'setup-python' in other
platforms such as Windows build.

For simplicity, let's just use the default python in the runner [3],
which is Python 3.11 as of writing. Then we should no longer see
errors from 'setup-python' in the build summary [4].

#codehealth

 [1]: 4af1a44
 [2]: actions/setup-python#808
 [3]: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-14-Readme.md
 [4]: actions/setup-python#809

PiperOrigin-RevId: 604223079
@mayeut
Copy link
Contributor

mayeut commented Feb 17, 2024

actions/python-versions#214 enabled 3.8 & 3.9 for macOS arm64. It's probably a matter of starting the builds there ?

The build for 3.8 & 3.9 was broken by actions/python-versions#223
I opened actions/python-versions#259 so it's now a matter for maintainers to review that PR then start a build.

@jmarrec
Copy link

jmarrec commented Mar 8, 2024

This is blocking me.

thanks @mayeut !

Can someone go review the PR please? It's only two lines but would make a difference in my workflows!

@dragazo
Copy link

dragazo commented Apr 17, 2024

I'll also note that pypy3.7 is also not working.

@agriyakhetarpal
Copy link
Author

I see that new releases are out with Python 3.8 and Python 3.9 on arm64 macOS, thanks to @mayeut for the fix! I just tested and they still don't work, but it should be a matter of time before this can be closed – all that should be left is that the versions-manifest.json file has to be updated to include these new builds.

@HarithaVattikuti
Copy link
Contributor

Hello @agriyakhetarpal

We are supporting python 3.8 and 3.9 versions for macos 14 now. Please test your workflows.

Feel Free to reach out to us in case of any issues.

@agriyakhetarpal
Copy link
Author

Working as intended, now. Thank you, @HarithaVattikuti!

@m-reuter
Copy link

m-reuter commented May 3, 2024

Hi, I still have issues with python 3.8, 3.9 and 3.10:

Does not happen on 3.11. Looks like the libintl is missing. Is this automatically running on M1 ? Then why does it work for 3.11? I did not adjust the yml , which uses macos-latest .

Run actions/setup-python@v5
  
Installed versions
  Version 3.8 was not found in the local cache
  Version 3.8 is available for downloading
  Download from "https://github.com/actions/python-versions/releases/download/3.8.18-5997368067/python-3.8.18-darwin-x64.tar.gz"
  Extract downloaded archive
  /usr/bin/tar xz -C /Users/runner/work/_temp/0d29e87d-4b98-49af-a8c6-51392e9358aa -f /Users/runner/work/_temp/a96315a7-5642-427a-9b66-52aeefe42798
  Execute installation script
  Check if Python hostedtoolcache folder exist...
  Create Python 3.8.18 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[3678]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
    Referenced from: <1286E7D2-FA50-3ECE-8514-2AB7882601AE> /Users/runner/hostedtoolcache/Python/3.8.18/x64/bin/python3.8
    Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cr
  Error: yptexes/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)
  ./setup.sh: line 52:  3678 Abort trap: 6           ./python -m ensurepip
  Error: The process '/bin/bash' failed with exit code 134

@m-reuter
Copy link

m-reuter commented May 8, 2024

To answer my own question, the reason for this is that it downloads the wrong package (python-3.8.18-darwin-x64.tar.gz) because I had explicitly requested the X64 architecture in my workflow:

        with:
          python-version: ${{ matrix.python-version }}
          #architecture: 'x64'

Commenting it out, fixed that. I guess many people have this in their workflows and it is easy to overlook.
It did work for Python 3.11 as that is pre-installed and does not need to download the file, therefore no architecture mismatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

7 participants