I have MAC osSierra (10.12.6). I needed to install PySide 1.2.4 for Python 3.3.6. I did the following to build and install PySide 1.2.4 that I need. You can do the following for any Python 3.3.x, I guess.
I am a newbie to Mac and Python. Please ignore if I have any mistakes.
- Install pyenv
brew install pyenv
- Install Python 3.3.6 using pyenv
pyenv install 3.3.6
- Add python 3.3.6 into system path
PATH="/Users/myname/.pyenv/versions/3.3.6/bin:${PATH}"
export PATH
- Install Xcode from app store, then run the following. Xcode download and install took 30-40 minutes for me.
xcode-select --install
sudo xcodebuild -license
- Install cmake
brew install cmake
- Verify cmake is installed. I see version 3.10.0 installed
cmake —version
- Tap qt4. Note: I tried qt5, but pyside build is not working for me with qt5.
brew tap cartr/qt4
brew tap-pin cart/qt4
- Install qt@4.
brew install qt@4
- Verify qmake is installed. I see version 2.01a installed
qmake —version
(If qmake is not recognized, create links to it using below command)
brew link cartr/qt4/qt@4 —-force
- If you are using “PySide.QtWebKit” in your programs, you need to install qt-webkit. Install pyside (1.2.2 ??), which will install qt-webkit. I am not sure if qt-webkit can be installed directly, if so someone can correct me.
brew install pyside
- Download PySide 1.2.4 tar file.
wget https://pypi.python.org/packages/source/P/PySide/PySide-1.2.4.tar.gz
- Untar the tar file
tar -xvf PySide-1.2.4.tar.gz
- Go into the folder
cd PySide-1.2.4
- Build pyside. This build step took almost 30-40 minutes for me
python setup.py bdist_wheel
- Verify that “dist” folder is created and it has pyside wheel file in it.
- Go into the “dist” folder
cd dist
- Instal PySide, last step!!
pip install PySide-1.2.4-cp33-cp33m-macosx_10_12_x86_64.whl
- Congratulations!, now you have PySide 1.2.4 for Python 3.3.x