View Full Version : Installing PyQt for OSX

10 October 2011, 03:02 AM
I'd like to start learning some PyQt, but I'm not quite sure how to do so. I'm currently running 10.7.1 osx, Python 3.2.2 and have Maya 2012. I tried following this tutorial on how to install PyQt4 ( but keep running into an error:

Import error: No module named sipconfig.
Which is the second to last step of the process! Very frustrating. I downloaded Qt from here ( which installed just fine, set me up with a new application to build and view Qt interfaces... but not sure what I'm doing really.

I'd like to be able to write my own UI and then load them up in Maya 2012. Am I going about this in the correct manner? How can I install PyQt then access it in IDLE, the Python Shell? Is that how you would work in PyQt, or do you build your interfaces with Qt Creator that comes from the Nokia site up above?


10 October 2011, 11:52 PM
Hey there man -

So you're using a lot of specs that I haven't actually worked with before (usually working in Linux/Windows w/ Python 2.4 - 2.6).

I know that it can work with your specs...

I have never tried using Qt Creator for Python development, but my general understanding is that its primarily a C++ development utility, I use the Qt Designer vs. Creator for the UI files.

I generally don't like IDLE, I just use my own editor that I wrote in PyQt and haven't needed it in a Mac I don't have much by way of best option for a Mac.

As for the PyQt sipconfig settings - it looks like you're trying to use pre-built binaries, which may not match your specs. The Mac/Linux versions for SIP/PyQt usually have to be built to spec, so you should download the source code for SIP here:

And PyQt here:

And follow the installation/build instructions.

Its usually relatively straightforward.

Anyway - I hope that helps!

10 October 2011, 07:52 PM
After another hour or so of fluffing about, I finally managed to get it installed! I'm not sure where things were going wrong, but I found this site which suggested I try install PyQt on a new admin account.

It all installed fine and when I swapped users I was able to load up IDLE and import PyQt4, even make a little 'Hello, world' window too!

Thanks for the help, ehusler. I'll be able to start going through your blog and learning some PyQt now. Cheers!

CGTalk Moderation
10 October 2011, 07:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.