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. Mac M1 & PySide 2/6 can't Install lib

Mac M1 & PySide 2/6 can't Install lib

Scheduled Pinned Locked Moved Unsolved Qt for Python
12 Posts 8 Posters 9.4k 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 1 Mar 2021, 13:07 last edited by Dariusz 3 Jan 2021, 13:09
    #1

    Hey

    I'm trying to install PySide2/6 on my m1 mac but all I get is >

    ERROR: Could not find a version that satisfies the requirement PySide2
    ERROR: No matching distribution found for PySide2
    
    

    Any ideas how to bite it?

    TIA

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Mar 2021, 19:31 last edited by
      #2

      Hi,

      How are you trying to install it ?
      Using the system pip ? Conda ? Brew ? Macports ?

      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
      • D Offline
        D Offline
        Dariusz
        wrote on 1 Mar 2021, 20:37 last edited by
        #3

        Pycharm just in settings > interpreter + PySide2/ PySide6
        As well as I tried via pip install I think too.
        I'm new to Mac so perhaps thats totally wrong way of doing it ?
        TIA

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Mar 2021, 20:46 last edited by
          #4

          There are several possible ways to handle Python on macOS.

          However, based on the Qt for Python Wiki page, it looks like the M1 is not yet natively supported.

          I would check with homebrew and/or conda.

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

          D 1 Reply Last reply 1 Mar 2021, 21:39
          0
          • S SGaist
            1 Mar 2021, 20:46

            There are several possible ways to handle Python on macOS.

            However, based on the Qt for Python Wiki page, it looks like the M1 is not yet natively supported.

            I would check with homebrew and/or conda.

            D Offline
            D Offline
            Dariusz
            wrote on 1 Mar 2021, 21:39 last edited by
            #5

            @SGaist F!ck big time. Bought mac so I can dev my apps for Apple & Qt and now Qt is not supported... ohh boy now I'm in trouble :- )
            Gotta start praying that M1 get supports... this... year... maybe? :- X

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 1 Mar 2021, 21:51 last edited by
              #6

              Qt for Python is not yet supported.

              You can still develop in C++ or try to build PySide2/6 yourself.

              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
              • G Offline
                G Offline
                GRomR1
                wrote on 24 Jul 2021, 15:48 last edited by GRomR1
                #7

                Hi @Dariusz
                I use this article and I successfully build PySide6 - 6.1.2 from sources on my MacBook Pro with M1.

                In the begin I start install necessary utilities via brew:

                brew install qt@6 llvm cmake ninja
                

                After that I clone the setup repo, activate python venv and install python packages:

                git clone --recursive https://code.qt.io/pyside/pyside-setup
                cd pyside-setup && git checkout 6.1.2
                python3 -m venv testenv
                source testenv/bin/activate
                pip install -r requirements.txt
                

                I've found that the installation will work only if set this system variable:

                export CLANG_INSTALL_DIR=/opt/homebrew/opt/llvm
                

                Next I run the build process. It takes a while time (check the correct path for qmake - qmake -v):

                python setup.py build --qmake=/opt/homebrew/Cellar/qt/6.1.2/bin/qmake --build-tests --ignore-git --parallel=8
                

                In the result I see the finish message:

                --- Build completed (413s)
                

                To install the PySide into the current virtual env run this:

                python3 setup.py install --qmake=/opt/homebrew/Cellar/qt/6.1.2/bin/qmake --build-tests --ignore-git --parallel=8 --reuse-build
                

                Completed. You will see the PySide package in pip list:

                pip list | grep PySide
                PySide6                       6.1.2
                

                Also I use these commandd to copy the installed package to another project

                export MY_PROJECT_VENV_PATH=../another-project/venv
                rsync -av testenv/bin/shiboken6* $MY_PROJECT_VENV_PATH/bin
                rsync -av testenv/bin/pyside6-* .$MY_PROJECT_VENV_PATH/bin
                rsync -av testenv/lib/python3.9/site-packages/PySide6*  $MY_PROJECT_VENV_PATH/lib/python3.9/site-packages/
                rsync -av testenv/lib/python3.9/site-packages/shiboken6*  $MY_PROJECT_VENV_PATH/lib/python3.9/site-packages/
                
                1 Reply Last reply
                4
                • S Offline
                  S Offline
                  sanpen
                  wrote on 14 Oct 2021, 20:25 last edited by
                  #8

                  Hi this was of great help, however I cannot get it done.

                  As of today the only difference for me is that the version downloaded by brew was 6.2.0.
                  In the last compilation steps I get an error saying:

                  CMake Error at cmake_install.cmake:61 (file):
                    file INSTALL cannot find "/opt/homebrew/Cellar/qt/6.2.0/bin/Assistant.app":
                    No such file or directory.
                  

                  I have no idea whay that is missing or how to get it. Any help is appreciated.

                  Thanks,
                  Santi

                  lyooL 1 Reply Last reply 29 Oct 2021, 14:44
                  0
                  • S sanpen
                    14 Oct 2021, 20:25

                    Hi this was of great help, however I cannot get it done.

                    As of today the only difference for me is that the version downloaded by brew was 6.2.0.
                    In the last compilation steps I get an error saying:

                    CMake Error at cmake_install.cmake:61 (file):
                      file INSTALL cannot find "/opt/homebrew/Cellar/qt/6.2.0/bin/Assistant.app":
                      No such file or directory.
                    

                    I have no idea whay that is missing or how to get it. Any help is appreciated.

                    Thanks,
                    Santi

                    lyooL Offline
                    lyooL Offline
                    lyoo
                    wrote on 29 Oct 2021, 14:44 last edited by
                    #9

                    @sanpen
                    just need to create some links, then you can walk around the issue.

                    cd /opt/homebrew/Cellar/qt/6.2.0/bin
                    ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Assistant.app Assistant.app
                    ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Designer.app Designer.app
                    ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Linguist.app Linguist.app
                    ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/pixeltool.app pixeltool.app
                    ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/qdbusviewer.app qdbusviewer.app

                    P 1 Reply Last reply 11 Jan 2022, 00:55
                    1
                    • P Offline
                      P Offline
                      Pipper
                      wrote on 30 Oct 2021, 20:05 last edited by
                      #10

                      I just saw this thread. @Dariusz, go into the /Applications folder on your Mac and right click the 'Terminal' app in the Utilities folder. You'll see a check box for 'Open using Rosetta'. If you check that, you should be good to go. Just close and reopen the Terminal app if it was already open. Hope that works.

                      1 Reply Last reply
                      0
                      • lyooL lyoo
                        29 Oct 2021, 14:44

                        @sanpen
                        just need to create some links, then you can walk around the issue.

                        cd /opt/homebrew/Cellar/qt/6.2.0/bin
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Assistant.app Assistant.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Designer.app Designer.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Linguist.app Linguist.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/pixeltool.app pixeltool.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/qdbusviewer.app qdbusviewer.app

                        P Offline
                        P Offline
                        phatmandrake
                        wrote on 11 Jan 2022, 00:55 last edited by
                        #11

                        @lyoo said in Mac M1 & PySide 2/6 can't Install lib:

                        @sanpen
                        just need to create some links, then you can walk around the issue.

                        cd /opt/homebrew/Cellar/qt/6.2.0/bin
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Assistant.app Assistant.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Designer.app Designer.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/Linguist.app Linguist.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/pixeltool.app pixeltool.app
                        ln -s /opt/homebrew/Cellar/qt/6.2.0/libexec/qdbusviewer.app qdbusviewer.app

                        This worked, but interestingly the bin directory as of 6.2.2 contains aliases for these apps, just without the .app suffix.

                        1 Reply Last reply
                        0
                        • CristianMaureiraC Offline
                          CristianMaureiraC Offline
                          CristianMaureira
                          wrote on 12 Jan 2022, 13:28 last edited by
                          #12

                          FYI: PySide 6.2.2+ provide support for Apple Silicon, so you could simple run a pip install pyside6 and get it.
                          Because PySide2 is in maintenance mode, there has been no discussion on backporting the support.

                          1 Reply Last reply
                          1

                          • Login

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