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

Python3.9 on aarch64 for macOS 13.4.1. #696

Closed
2 of 5 tasks
tvorogme opened this issue Jul 3, 2023 · 23 comments
Closed
2 of 5 tasks

Python3.9 on aarch64 for macOS 13.4.1. #696

tvorogme opened this issue Jul 3, 2023 · 23 comments
Assignees
Labels
bug Something isn't working

Comments

@tvorogme
Copy link

tvorogme commented Jul 3, 2023

Description:
Error: The version '3.9' with architecture 'arm64' was not found for macOS 13.4.1.

Action version:
'actions/setup-python@v4' (SHA:bd6b4b6205c4dbad673328db7b31b7fab9e241c0)

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
(aarch64, macOS, Python3.9)

Repro steps:

      - uses: actions/setup-python@v4
        with:
          python-version: "3.9"

Expected behavior:
Successfully installed python

Actual behavior:
Error message

@tvorogme tvorogme added bug Something isn't working needs triage labels Jul 3, 2023
@dusan-trickovic
Copy link

Hello, @tvorogme ! Thank you for creating this issue, we'll investigate it and see what can be done :)

@tvorogme
Copy link
Author

tvorogme commented Jul 6, 2023

@dusan-trickovic hey! When approximately can we expect a fix? I really need this container for cross-platform distribution of the package.

@dusan-trickovic
Copy link

dusan-trickovic commented Jul 13, 2023

Hello @tvorogme ! Thank you for reaching out and I apologize for a later response. I will consult with the team regarding this and get back to you with our findings as soon as possible. Thank you for your patience and cooperation on this :)

EDIT: In case there were any recent developments / updates regarding this issue, please feel free to let us know about it

@dusan-trickovic dusan-trickovic self-assigned this Jul 13, 2023
@dusan-trickovic
Copy link

Hello again, @tvorogme ! I just wanted to check in with you and ask you if you could please try using Python version such as 3.10.11 in your workflow? From the description of your problem, it seems as though that version of Python just simply doesn't exist for your specific architecture in the versions repository (while there is an arm64 option for 3.10.11 for darwin).

Newer versions (such as 3.11 and 3.12 alpha and beta) also seem to have support for arm64, but I suggested 3.10.11 as it is the closest to the one you need. If it won't affect your own personal requirements for the project, I would suggest trying to use the suggested version and seeing if that fixes the error you've encountered.

If you encounter any more issues (similar to this or otherwise), please don't hesitate to reach out again. On the other hand, if this solved your issue, you can also let us know about it so that we can close it.

Thank you very much for your cooperation :)

@tvorogme
Copy link
Author

@dusan-trickovic hey! Glad you right back.

Thanks for the idea, but it doesn't work for me. We are developing a package that should be available on: Windows / Linux / macOS. Since we work with pybind11 we are tied to the major python releases, so we support py3.9 / py3.10 / py3.11. If we make a package for py3.10 it means it won't work for py3.9.

As a temporary solution, I made a separate workflow just for macOS aarch64 / x86_64 that installs python3.9 from brew, because it's not working from actions/setup-python. But it's very ugly.

Your workflow works for all other versions, and it's very cool.

You also can look at status of python versions, the Python3.9 is not end-of-life status.

Screenshot 2023-07-15 at 11 01 42 AM

@dusan-trickovic
Copy link

Hello again @tvorogme ! I just wanted to drop an update here and say that, at this time, we only have arm64 support for versions 3.10 and later. Therefore, although 3.10 and 3.11 fit this criteria, 3.9 unfortunately doesn't, though we will investigate that too in the future.

Thank you very much for your time and cooperation :)

@richard-scott
Copy link

I can't believe this is still a problem 3 years after Python started supporting the M1 architecture.

However, it's not just Apple hardware having problems as I have issues with major version numbers such as version '3.10' with architecture 'arm64' was not found for Debian 12.

@ianspektor
Copy link

at this time, we only have arm64 support for versions 3.10 and later

Is there a timeline on getting support for installing 3.8 and 3.9 in mac arm runners? We wanted to automate the build and upload of our Python package but doing it only for >= 3.10 and having to manually build and upload for lower versions wouldn't be of much value 🥲

@rwader-swi
Copy link

rwader-swi commented Mar 13, 2024

i'm getting the same for 3.9 on Debian 12😞

@ianspektor
Copy link

For anyone else with this problem, we resolved to drop setup-python and just install python, pip, and poetry manually. Full working example here: https://github.com/google/temporian/blob/main/.github/workflows/publish.yaml

build-macos-arm:
    runs-on: macos-13-xlarge
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Python
        run: |
          brew update
          brew install python@${{ matrix.python-version }}

      - name: Install pip
        run: |
          curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
          python${{ matrix.python-version }} get-pip.py

      - name: Install poetry
        run: pip install poetry

@richard-scott
Copy link

Are you all using v5 of the Action??

uses: actions/setup-python@v5

@ianspektor
Copy link

We were using v4 before switching to the manual installations, haven't tried v5 on arm

@bswck
Copy link

bswck commented Apr 22, 2024

@mjurbanski-reef
Copy link

mjurbanski-reef commented Apr 23, 2024

I also just got hit by this for all 3.7-3.9 versions after using macos-latest successfully for year or so in GHA.
I'm testing library that deals with some low level filesystem handling at times, hence why testing on multiple platforms on multiple python versions is essential and not optional.

I can understand python versions beyond EoL not working, but it is disappointing to see others stopped working as well.
To make matters worse, since my workflow uses multiple repositories and jobs, it seems I'm only seeing this error out on some, and not others, probably caused by incremental rollout of macos 14 .

I also test pypy3.9 and pypy3.10 - should I expect pypy3.9 to stop working on macos-latest any day now as well? Where can I find the support matrix?

LennyN95 added a commit to ImagingDataCommons/dcmqi-python-distributions that referenced this issue Apr 25, 2024
khaeru added a commit to khaeru/sdmx that referenced this issue Apr 25, 2024
nifflets added a commit to GoogleCloudPlatform/functions-framework-python that referenced this issue Apr 26, 2024
Workaround for actions/setup-python#696. macos-latest recently was updated to point to macos-14, which does not support Python 3.7, 3.8, 3.9 on ARM.
matthewrobertson pushed a commit to GoogleCloudPlatform/functions-framework-python that referenced this issue Apr 29, 2024
* Fix unit tests

Workaround for actions/setup-python#696. macos-latest recently was updated to point to macos-14, which does not support Python 3.7, 3.8, 3.9 on ARM.

* Update unit.yml

* Update unit.yml
matthewrobertson pushed a commit to GoogleCloudPlatform/functions-framework-python that referenced this issue Apr 29, 2024
* Fix unit tests

Workaround for actions/setup-python#696. macos-latest recently was updated to point to macos-14, which does not support Python 3.7, 3.8, 3.9 on ARM.

* Update unit.yml

* Update unit.yml
matthewrobertson pushed a commit to GoogleCloudPlatform/functions-framework-python that referenced this issue Apr 29, 2024
* Fix unit tests

Workaround for actions/setup-python#696. macos-latest recently was updated to point to macos-14, which does not support Python 3.7, 3.8, 3.9 on ARM.

* Update unit.yml

* Update unit.yml
jstvz added a commit to SFDO-Tooling/CumulusCI that referenced this issue May 3, 2024
lxml compilation errors are failing 3.8-macos builds. Possibly related
to actions/setup-python/issues/696
jstvz added a commit to SFDO-Tooling/CumulusCI that referenced this issue May 3, 2024
lxml compilation errors are failing 3.8-macos builds. Possibly related
to actions/setup-python/issues/696
jstvz added a commit to SFDO-Tooling/CumulusCI that referenced this issue May 3, 2024
Importing `lxml` in Python 3.8 now throws an `ImportError` on macOS:

```python-traceback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/__init__.py", line 743, in import_plugin
    __import__(importspec)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 171, in exec_module
    exec(co, module.__dict__)
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/tests/pytest_plugins/pytest_sf_orgconnect.py", line 9, in <module>
    from cumulusci.cli.org import org_remove, org_scratch, org_scratch_delete
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/cli/org.py", line 12, in <module>
    from cumulusci.core.config import OrgConfig, ScratchOrgConfig
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/core/config/__init__.py", line 8, in <module>
    from cumulusci.core.utils import import_global
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/core/utils.py", line 21, in <module>
    from cumulusci.utils.options import parse_list_of_pairs_dict_arg
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/utils/__init__.py", line 20, in <module>
    from .xml import (  # noqa
  File "/Users/runner/work/CumulusCI/CumulusCI/cumulusci/utils/xml/__init__.py", line 5, in <module>
    from lxml import etree as lxml_etree
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'
```

According to the discussion on actions/setup-python#696, `macos-latest`
runners are now on `AArch64`, while `macos-13` is still on `x86`. This
PR switches the 3.8 runner to `macos-13` as a workaround.
khaeru added a commit to khaeru/genno that referenced this issue Aug 9, 2024
khaeru added a commit to khaeru/sdmx that referenced this issue Aug 16, 2024
khaeru added a commit to khaeru/sdmx that referenced this issue Aug 16, 2024
@aparnajyothi-y
Copy link
Contributor

Hello Everyone, We have already added arm64 support for Python version 3.9. Please find the attached screenshot for reference. Please validate from your end and confirm.

Screenshot 2024-08-20 at 6 56 37 PM

@hugovk
Copy link
Contributor

hugovk commented Aug 24, 2024

@aparnajyothi-y
Copy link
Contributor

Thanks @hugovk for the confirmation and proceeding to close the issue as issue addressed and confirmed.

khaeru added a commit to transport-data/tools that referenced this issue Sep 6, 2024
khaeru added a commit to transport-data/tools that referenced this issue Sep 6, 2024
khaeru added a commit to transport-data/tools that referenced this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests