Building Qt / PyQt4 for Mavericks

369 views
Skip to first unread message

Mark Dietel

unread,
May 19, 2014, 3:01:39 PM5/19/14
to python_in...@googlegroups.com
Hey guys,

I just installed Maya 2015 in a fresh Mavericks (osx 10.9.3) environment and I can't seem to build PyQt.  I'm following the directions from Autodesk but my builds result in missing symbols when I load the PyQt4 module.

from PyQt4 import QtGui

# Error: ImportError: file <maya console> line 1: dlopen(/Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so, 2): Symbol not found: __ZN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EE11qt_metacastEPKc
 
Referenced from: /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so
 
Expected in: flat namespace
 
in /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so #


Is there an easier way to setup the Qt / PyQt environment?  Can I download a build from somewhere? Is anyone else working in Mavericks with Maya 2015?

Chad Vernon

unread,
May 19, 2014, 3:10:37 PM5/19/14
to python_in...@googlegroups.com
Can you use PySide?  It ships with Maya now.

Justin Israel

unread,
May 19, 2014, 3:28:05 PM5/19/14
to python_in...@googlegroups.com

Hey Mark!

Not sure if you tried this out yet but I was maintaining OSX build scripts for Maya PyQt here:
https://github.com/justinfx/MyQt4

But I stopped doing at after 2013 since as Chad noted they began shipping 2014 with PySide. So the whole thing got simpler.

You could start with my 2013 script and make changes. It may need to be pointed at a newer Qt/PyQt version.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/aa547527-9767-498f-a1c6-1ef5e37187ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Dietel

unread,
May 19, 2014, 3:47:40 PM5/19/14
to python_in...@googlegroups.com
Unfortunately our studio has a lot of legacy tools that will need PyQt so I'll need a good build.  If I had the luxury of starting over, we'd write new tools using PySide.  It seems a lot easier since it ships w/ Maya.  

Thanks for the suggestion.

Mark Dietel

unread,
May 19, 2014, 3:49:41 PM5/19/14
to python_in...@googlegroups.com
Justin,

I'll take a look at the build script.  Maybe it will point me in a undiscovered direction.  FYI: I'm also opening a case with Autodesk.


On Monday, May 19, 2014 12:28:05 PM UTC-7, Justin Israel wrote:

Hey Mark!

Not sure if you tried this out yet but I was maintaining OSX build scripts for Maya PyQt here:
https://github.com/justinfx/MyQt4

But I stopped doing at after 2013 since as Chad noted they began shipping 2014 with PySide. So the whole thing got simpler.

You could start with my 2013 script and make changes. It may need to be pointed at a newer Qt/PyQt version.

On May 20, 2014 7:10 AM, "Chad Vernon" <chadv...@gmail.com> wrote:
Can you use PySide?  It ships with Maya now.


On Monday, May 19, 2014 12:01:39 PM UTC-7, Mark Dietel wrote:
Hey guys,

I just installed Maya 2015 in a fresh Mavericks (osx 10.9.3) environment and I can't seem to build PyQt.  I'm following the directions from Autodesk but my builds result in missing symbols when I load the PyQt4 module.

from PyQt4 import QtGui

# Error: ImportError: file <maya console> line 1: dlopen(/Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so, 2): Symbol not found: __ZN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EE11qt_metacastEPKc
 
Referenced from: /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so
 
Expected in: flat namespace
 
in /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so #


Is there an easier way to setup the Qt / PyQt environment?  Can I download a build from somewhere? Is anyone else working in Mavericks with Maya 2015?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Justin Israel

unread,
May 19, 2014, 3:56:13 PM5/19/14
to python_in...@googlegroups.com

I have a feeling Autodesk won't be able to do much since they don't really support PyQt. Just the info regarding how it can be built. They might just tell you to migrate to PySide since they bundle it.

PySide shouldn't be too different really other than scanning your PyQt tools for usage of QVariant and QString,  which are removed from PySide. It follows the similar SIP v2 API for PyQt. And it only affects tools that are launched directly within Maya.

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/dd7d63ff-6f70-403c-8c84-140c15f12574%40googlegroups.com.

Joe Weidenbach

unread,
May 23, 2014, 12:12:00 AM5/23/14
to python_in...@googlegroups.com
I'm a little late to the game on this one (silly MFA graduations and all), but my experience with PyQt post-maya2013 has been rather bad.  I found that with simple scripts, everything works with PyQt in Maya 2014, but the moment you get a more complex script (which consists of multiple files), Signals and Slots seem to stop working.  I was never able to get it working, so I bit the bullet and switched to PySide.  Aside from about an hour or two of conversion headaches, it's not been too bad.

Of course, that's not in Mavericks (I'm on Windows 7), and it's in 2014, but that's what I've seen since autodesk bundled PySide.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.

Mark Dietel

unread,
Jul 17, 2014, 7:11:10 PM7/17/14
to python_in...@googlegroups.com
Just thought I'd update the situation for anyone who finds the thread. Autodesk support hasn't been super helpful and can't figure out the issue. During the course of my correspondence with an Autodesk developer (presumably quite a few time zones away since I only received a single email per day and at very strange hours), I decided to start converting our tools over to PySide.  The experience was fairly painless and smooth.  Our future development will be done using the PySide libraries. 

Thanks Justin, Chad, and Joe for your input.
Justin,

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

muzzl...@gmail.com

unread,
Sep 1, 2014, 2:44:37 PM9/1/14
to python_in...@googlegroups.com
Here's a data point that I came across that may clue in on this issue. I've been having trouble compiling Autodesk's modified Qt source for Maya 2015 (qt-adsk-4.8.5) on Mavericks 10.9.4. During the build, a linker error occurs:

Undefined symbols for architecture x86_64:
"Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::qt_metacast(char const*)", referenced from:
vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o
"Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::metaObject() const", referenced from:
vtable for Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0> in window.o

This appears to be the same symbol that PyQt was unable to find, as referenced in the original post.

In order to compile qt-adsk-4.8.5 successfully, I needed to follow the instructions on this page:
https://bugreports.qt-project.org/browse/QTBUG-37209

This is reported as being fixed in the original Qt 4.8.7 patch release.

-Robert
> To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
>
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/aa547527-9767-498f-a1c6-1ef5e37187ad%40googlegroups.com.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages