Nov 092011
 

This is a follow up post to my previous one on Installing PyQt4 for Maya 2011

Recently while putting together my next video tutorial for Python for Maya, I came to a section where I wanted to demo PyQt4 in Maya2012. But I was concerned that viewers would have to go through the complicated steps of building PyQt4. I noticed that other people have made available precompiled PyQt installers for windows (here) but I could not find any for OSX or linux. So I decided to put together a build.

I created a new project on github called MyQt4
https://github.com/justinfx/MyQt4

Its a Makefile for completely downloading and building PyQt4 for maya, and generating a .pkg installer. Hopefully someone can contribute improvements since I dont have a ton of experience writing makefiles, and also that someone might create a linux version.

Here is a link to the latest pkg build:

Snow Leopard: 

Lion:  

Mountain Lion:

Here are builds other people have made:

  25 Responses to “Installing PyQt4 for Maya 2012+ (osx)”

  1. Is it possible for you to provide the following as well?
    10.6, maya 2011 binaries (both sip and PyQt)
    10.7, maya 2011 binaries (both sip and PyQt)

    I would be extremely grateful. I am having a hard time getting 10.7 to build right now

    • @Tom – I could probably do a 10.6 maya 2011. Or if you manage to do one using the MyQt project I created, I will host the build. 10.7 might be hard for me because I don’t have any Lion systems available with Maya.

  2. Heya Justin!

    I’m trying to wrap my head around pyQT and python. I’m wondering if all the computers using the GUI needs pyQT installed.

    If i have a computer at hom where i build the GUI can i use it on my work computer without installing the pyQT package?.

    TIA

  3. @David – Basic answer, yes. Each machine would need PyQt install in order to run the scripts. In a production environment, you could build PyQt once in a network location, and point everyone at it using the PYTHONPATH. But you could also explore using py2app to create distributable .app packages that contain their own portable python environment.

  4. hello, Justin, First of all, thanks for the package..it is such a nice thing to have for sure..
    since I have not been tried out yet but wonder if this will work under Lion..?
    I know you seems to use previous OS but if possible, I wanna ask if there is something I have to know before installing..since I have been using pyqt already hope it won’t overlap any pre-existed one..( brief look at makefile code, my assumption is it will be safe to run but wanna double check…)
    any advice will be appreciated it…!! ^^
    thank again.

    • I havent actually tested this on a Lion install but I want to say yes that it should still work. The build is stil x64 and its still based on the same python thats part of maya and not Lion. Either way it shouldnt step on a general installation of pyqt in your system python location since this installer puts everything into the maya python location. Try it and report back since someone else commented asking for a Lion specific build. I feel pretty convinced that its not neccessary.

      • The build of Qt doesn’t work on Lion. I get lots of build warnings from the headers:
        #warning “This version of Mac OS X is unsupported”

        And then compiler warnings and errors like:
        kernel/qcocoasharedwindowmethods_mac_p.h:312: error: invalid conversion from ‘objc_object*’ to ‘NSDragOperation’

        However, doing the build on Snow Leopard and using the binaries on Lion *should* work.. I haven’t tried that.

  5. Lion build added, thanks to Chris!

    • Hi Justin,
      Thanks for the installation, im trying to install on Lion but it doesnt seem to install properly. I dont get any errors, the installation finishes successfully but i cant find any myQt files anywhere (even the /usr/local/bin location its supposed to). Am I missing something else I’m suppose to have installed? I have the latest XCode from apple. Am I missing something obvious?

      Cheers
      Will.

  6. [...] First Step is to get the PyQt installer. You can get it here. Thank’s Justin Israel for [...]

  7. hey Justin

    first off i will like to say thanks for compiling this for us
    but iam running into a problem.. iam running osx and i have homebrew and when trying to use it in maya its crashing.

    objc[40666]: Class QCocoaColorPanelDelegate is implemented in both /Applications/Autodesk/maya2012/Maya.app/Contents/MacOS/QtGui and /usr/local/Cellar/qt/4.7.3/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.

    is there a way to define so that it only uses the maya qt library

    best regards
    Nicolai Slothuus

    • That is a problem being caused by having PyQt4 from homebrew in your path. You are loading that one first which is causing both the homebrew Qt modules and the Maya Qt modules to be loaded. Try ensuring that Maya’s pythonpath is first so it picked up the proper PyQt

  8. Hi Justin,

    I need to install PyQt on my mac and after looking at long and complicated instructions I was relieved to find your installer. Thank you for putting in the time and effort to help people like me.

    However, when I tried it out with the plug-in that I needed it for, I get this error message:

    # Error: ImportError: dlopen(/Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/PyQt4/QtMultimedia.so, 2): Library not loaded: libQtMultimedia.4.dylib
    Referenced from: /Applications/Autodesk/maya2012/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages/PyQt4/QtMultimedia.so
    Reason: image not found

    I also could not find a sip.pyd file (as per the instructions for installing PyQt4 for this plug-in). Files with related names that are already in the site-packages folder are:
    sip.so
    sipconfig.py
    sipconfig.pyc
    sipdistutils.py

    Could it be that the library libQtMultimedia.4.dylib and this sip.pyd file are missing from your installer? Would it be possible to add them?

    Best,
    Linnea

    • Sorry for the late reply on this issue. I was not properly linking all of the Qt modules that were newly included in 2012/2013. This has been fixed and the 10.6.8 packages have been updated.

  9. Hello Justin,

    First of all, many thanks for your wonderful blog and tutorials.
    I’ve been trying to install the Qt and PyQt on my Mac for Maya2013.
    I’ve followed your tutorial on Cmivfx and used the Pyqtx and anything else that I could get my hands on, but I’ve been unsuccessful.
    Even though installing the PyQtx is successfull but I still don’t have the “pyuic4″.
    I appreciate any help.

    • I too am in a similar situation. I’ve tried maya2012, 2013 and everything seems to install properly. ipython works but can’t find PyQt4, nor do either of the pyuic4 or pyrcc4 load up the help file from the -h flag.

      I’m so confused. Is this just a PATH issue?(still somewhat new integrating UNIX, especially with external apps)

      My machine is running 2.7.1 python on OS 10.7.5 and the current package installer you’ve graciously provided appears to have run successfully. Pardon me for my lack of clarity on this, as I’m sure it’s something obvious to a more seasoned user. Any help would be super appreciated as I’ve been unsure if something such as multiple installs are causing conflicts etc.. I’m a a loss.

      Thanks for all your hard work Justin. I can’t wait to dig in and learn this stuff, but could definitely use a bit of guidance as to what I’m doing wrong. I’ve read a few google threads to no avail…perhaps I’ve overlooked the golden nugget though. Sincerely, thanks again.

      -Ryan

  10. Thanks for the build! I’ve never had PyQT running on OSX Maya. It is good fun to develop on my Mac and very convenient instead of having to boot into Win7.

    Download was easy, install was fast and simple.

    Thank you, sir.

    -jason

  11. HeyJustin, what is with the installer for Mountain Lion being for a version of Maya that never worked properly (2011).I’m loving the new builds of Maya 2013 on Mac OSX, I find it better than Windows, with the added bonus Mentalray is much faster on MacOS.

    Am I missing something here, or is there no way to use your installer(s) to install the PyQT libraries on a current Mac running current Maya?

  12. Thanks again for your efforts, but never mind about my question earlier – I downloaded the installer on the Chinese (or Japanese) website linked to above for MyQt4.9.4 and Maya 2013 10.6 and it worked for my Mountain Lion 10.83 installation. Tried installing all the versions on your site first though just to see, but none of them worked.

    • Hi Alyssa. Thanks so much for doing this. I sponsor a litlte girl named Kilouseky Marie through Compassion International. She is in center HA-766 there in Haiti. Still no word yet on her, but I think she lived far enough away that she should be ok. I am still saying prayers for her, as I do every night, and for all the people of Haiti and Compassion. I donated to the disaster fund this morning ($100). My timing for her birthday gift and a family gift may end up being perfect. I sent off donations for that in the beginning of November because her 8th birthday is on Monday (they say it can take a few months). Thank you again for all that you are doing.

  13. Hi Justin:

    It is too glad to find your web pages. As of doing rigging in maya and a python beginner, I eagerly want to have something like pyqt to speed up my work. My machine is running mac 10.7 and with maya2013. I try the link———- “MyQt4.8.6-maya2013-x64-osx-10.7.pkg” . It seems doesn’t work. However thank you provide this space as a platform.

    sincerely

  14. Hi there, thank you for this installer. However I am using MAYA 2014. Is there any chance of building MYQT4 for Maya 2014? Windows 7 or windows 8

    Sincerely

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">