Pyqt For Mac Os



A short How-To for using PyInstaller with PyQt on Mac OS-X: PyInstaller On Mac OS X. Get a full standard windows application and the user has no idea that the stuff was actually developed on Linux with Open Source technologies. Philippe Fremy. PyQt is a set of Python v2 and v3 bindings for The Qt Company's Qt application framework. The application runs on all platforms supported by Qt, including Mac OS X and iOS. The bindings are implemented as a set of Python modules and contain over 1,000 classes.

Hello! In my tutorial i’ll describe how to install PyQt4 on Os X manually. You can try installing by MacPorts or HomeBrew. I had tried both. But i couldn’t get the result what i wanted. So i managed my goal by installing and configuring manually.

This is a tutorial on Mac OS X 10.8.4, with: Python2.7; with : PyQt-mac-gpl-4.10.4-snapshot-f32540dbcf98.tar.gz and with : sip-4.15.2-snapshot-14732b487dda.tar.gz.

It should be the same on previous and next versions.

How to install PyQt4 ?
Download the SIP package (snapshot for OS x )
Download the PyQt package (snapshot for OS x)
Download Qt
Install Qt
Install SIP
Install PyQt
and try !

Download the Qt binary from the website : Download site (You may take the complete SDK) or Download here.

Download the SIP snapshot : Download site (for OS x)

Download the PyQt snapshot : Download site (for OS x)

For

1. And now install the first Qt binary, just follow and click on next until it as finished to install.
2. SIP :

SIP is the program that bind C++ with Python

Go were you have downloaded the sip tar.gz and enter the folder(Mostly Downloads folder)

And we are gonna try to install it with the following lines :

– arch x86_64 is to specify that we want this architecture. You may use i386 also!

Then lets make it and install it with the following commands :

3. PyQt4:

Once installed let’s move back an go to the PyQt folder to configure it and install it with the following command :

And let’s try to configure it with the right things

Important note: I had trouble finding qmake! If the path above doesn’t work for you, first try this command if you had qmake or not

After pressing return if you got the version that means you have qmake. Then type:

After pressing return you will get your qmake path.
If you don’t have qmake that means you didn’t install Qt. So install it!

Then let’s make them with:

Pyqt Mac Os

And now, everything should be Up and running. So let’s test it. On a terminal window type

When you are on interactive shell type:

After pressing return, if you dont get a error that means you have installed PyQt. you are now good to go.

4. Hello World by PyQt

Pyqt For Mac Os High Sierra

Save the python code above (hellow.py) and execute in terminal: