Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Is it possible to build PySide2 for M1 (arm64)?
Forum Update on Monday, May 27th 2025

Is it possible to build PySide2 for M1 (arm64)?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pyside2
3 Posts 3 Posters 928 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    carlos-villavicencio
    wrote on 29 Mar 2023, 19:15 last edited by
    #1

    I’m trying to build my project dependencies for native Apple Silicon support. However, I’m having issues compiling PySide2. I know… I know… it’s too old and it’s better to use PySide6. We want to upgrade that too. But my point is to know if I can do the arm64 support first.

    To build PySide2 I’m using:

    • macOS 12.6
    • XCode 14
    • I compiled Python 3.9 with no issues.
    • QT 5.15.10
    • libclang 12
    • pyside-setup (source code) 5.15.2.1

    My error message when I try to build PySide2 with python setup.py install --qmake=... is:

    Something's broken.  UCHAR_MAX should be defined in limits.h.
    

    I realized that since QT 5.15.4 I can use the option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" but I’m not sure how to pass it to pyside-setup.

    I have a couple of questions:

    1. Is it possible to compile PySide2 (QT5) for arm?
    2. How can I build PySide2 locally without a Qt license just for development purposes? I have my file only on CI and when I try locally I get:

    Error: Qt license file was not found! Project ERROR: License check failed! Giving up ... error: Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.

    Y 1 Reply Last reply 4 Apr 2023, 03:29
    1
    • C carlos-villavicencio
      29 Mar 2023, 19:15

      I’m trying to build my project dependencies for native Apple Silicon support. However, I’m having issues compiling PySide2. I know… I know… it’s too old and it’s better to use PySide6. We want to upgrade that too. But my point is to know if I can do the arm64 support first.

      To build PySide2 I’m using:

      • macOS 12.6
      • XCode 14
      • I compiled Python 3.9 with no issues.
      • QT 5.15.10
      • libclang 12
      • pyside-setup (source code) 5.15.2.1

      My error message when I try to build PySide2 with python setup.py install --qmake=... is:

      Something's broken.  UCHAR_MAX should be defined in limits.h.
      

      I realized that since QT 5.15.4 I can use the option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" but I’m not sure how to pass it to pyside-setup.

      I have a couple of questions:

      1. Is it possible to compile PySide2 (QT5) for arm?
      2. How can I build PySide2 locally without a Qt license just for development purposes? I have my file only on CI and when I try locally I get:

      Error: Qt license file was not found! Project ERROR: License check failed! Giving up ... error: Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.

      Y Offline
      Y Offline
      yusuf_dev
      wrote on 4 Apr 2023, 03:29 last edited by
      #2

      @carlos-villavicencio hi, did you find solution? Also how did you build pyside2 from source?

      S 1 Reply Last reply 5 Apr 2023, 20:22
      0
      • Y yusuf_dev
        4 Apr 2023, 03:29

        @carlos-villavicencio hi, did you find solution? Also how did you build pyside2 from source?

        S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 5 Apr 2023, 20:22 last edited by
        #3

        Hi,

        Since Qt 5.15.2 contains only x86_64, one thing you can do is start a shell with the arch command so that it runs in x86_64 mode and from there follow the build instructions.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        2/3

        4 Apr 2023, 03:29

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved