Installing PySide on Mac: is there a working method?

前端 未结 6 1671
离开以前
离开以前 2021-02-06 08:06

I may be doing something wrong, but I have been trying to install pyside on Mac 10.12 (Sierra). Here is what I tried (after installing Qt with brew):

  • With the prec
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 08:24

    You need QT4 to install PySide on 10.11 (not sure about 10.12).

    Install QT5 either via Brew or via installer, get cmake via brew and get the latest PySide source (https://pypi.python.org/packages/source/P/PySide/PySide-1.2.4.tar.gz) Run the following to get Qt4:

    brew tap cartr/qt4
    brew tap-pin cartr/qt4
    brew install qt_4
    

    Once you do so; cd in the source folder and run the following to build:

    python setup.py bdist_wheel --ignore-git --qmake=[QMAKE_FROM_QT4_PATH] --cmake=[YOUR_CMAKE_PATH]
    
    cd dist
    pip install [YOUR_BUILT_PYSIDE_WHEEL]
    

    Once you do so, you can check that PySide is working correctly, opening a Python console and typing import PySide

提交回复
热议问题