[Error] from PyQt4 import QtGui

146 views
Skip to first unread message

Ehsan Kiani

unread,
Jun 14, 2015, 3:40:17 PM6/14/15
to python_in...@googlegroups.com
Hey folks,

I'm trying to build PyQt for Mac and I followed this tutorial here

But I'm getting this error:

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 #

Any idea?

Thanks,
Ehsan

Justin Israel

unread,
Jun 14, 2015, 4:06:09 PM6/14/15
to python_in...@googlegroups.com

It looks like you are missing support for the Phonon plugin. It was built with references to it but the actual phonon lib isn't linked in.


--
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/2faf633a-7687-47f1-b8b5-05b14c52ea2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ehsan Kiani

unread,
Jun 14, 2015, 7:08:00 PM6/14/15
to python_in...@googlegroups.com
Thanks for the reply, but here when I change the qcongfig.pri sounds like the build configuration has included the phonon plugin, isn't?

#configuration
CONFIG += release def_files_disabled exceptions no_mocdepend stl x86_64 qt #qt_framework
QT_ARCH = macosx
QT_EDITION = OpenSource
QT_CONFIG +=  minimal-config small-config medium-config large-config full-config no-pkg-config dwarf2 phonon phonon-backend accessibility opengl reduce_exports ipv6 getaddrinfo ipv6ifname getifaddrs png no-freetype system-zlib nis cups iconv openssl corewlan concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release x86_64 qt #qt_framework
 
#versioning
QT_VERSION = 4.8.5
QT_MAJOR_VERSION = 4
QT_MINOR_VERSION = 8
QT_PATCH_VERSION = 5
 
#namespaces
QT_LIBINFIX = 
QT_NAMESPACE = 
QT_NAMESPACE_MAC_CRC = 
 
QT_GCC_MAJOR_VERSION = 4
QT_GCC_MINOR_VERSION = 2
QT_GCC_PATCH_VERSION = 1


On Sunday, June 14, 2015 at 1:06:09 PM UTC-7, Justin Israel wrote:

It looks like you are missing support for the Phonon plugin. It was built with references to it but the actual phonon lib isn't linked in.


On Mon, 15 Jun 2015 7:40 AM Ehsan Kiani <ehsanki...@gmail.com> wrote:
Hey folks,

I'm trying to build PyQt for Mac and I followed this tutorial here

But I'm getting this error:

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 #

Any idea?

Thanks,
Ehsan

--
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,
Jun 14, 2015, 7:22:55 PM6/14/15
to python_in...@googlegroups.com
This approach is different than how I used to built PyQt4 for Maya, pre-2013. So I haven't tried this particular approach. But it does look like you told PyQt to build against Phonon, yet in the final installation it cannot actually find and link phonon with Maya's Qt. What does the output of this command look like?

otool -L /Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so



To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b8b9ca3a-70a8-47fb-91a0-b8d58eef32f4%40googlegroups.com.

Ehsan Kiani

unread,
Jun 14, 2015, 7:56:30 PM6/14/15
to python_in...@googlegroups.com
Intersting command, it returns:

/Applications/Autodesk/maya2015/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/PyQt4/_qt.so:

@executable_path/phonon (compatibility version 4.4.0, current version 4.4.0)

@executable_path/QtXmlPatterns (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtWebKit (compatibility version 4.9.0, current version 4.9.4)

@executable_path/QtSvg (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtSql (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtOpenGL (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtXml (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtScriptTools (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtScript (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtDeclarative (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtNetwork (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtMultimedia (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtHelp (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtGui (compatibility version 4.8.0, current version 4.8.5)

@executable_path/QtCore (compatibility version 4.8.0, current version 4.8.5)

/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)


So perhaps I that I need to install QT 4.8.0 instead of 4.8.5? (Also I was thinking to downgrade my osx version to 10.7, right now I'm on Yosemite)

To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@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.

Justin Israel

unread,
Jun 14, 2015, 8:02:48 PM6/14/15
to python_in...@googlegroups.com
Hmmm. That implies that all of the libs should be in the same location as the Maya executable. Is that the case? Is phonon right there next to maya, within the .app? Where is phonon located?

You should not need to change Qt versions. 4.8.5 is 4.8 compat. Back when I was doing my builds, we needed to use a specific Autodesk modified Qt. The process was:
* build that Qt version
* build sip
* build PyQt against the custom Qt version
* relink the PyQt libs against Maya's own internal Qt

But I guess with just the headers and fake libs, you can get a PyQt build, using paths that are probably already correct. It just depends on whether those paths are pointing at the existing libs within Maya or not. 


To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@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_m...@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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a44152f1-4e38-4527-9c28-92f399ebbc3e%40googlegroups.com.

Ehsan Kiani

unread,
Jun 14, 2015, 8:15:58 PM6/14/15
to python_in...@googlegroups.com
Well so at the moment it is like this, In Maya.app/Contents/bin I have placed a file name qt.conf which is written as follow:
[Paths]
Prefix=
Libraries=../MacOS
Binaries=../bin
Headers=../../../devkit/include/Qt
Data=..
Plugins=../qt-plugins
Translations=../qt-translations

So I have the phonon at this address: /Applications/Autodesk/maya2015/devkit/include/Qt/phonon
It's just weird that it doesn't work, but I'm on a Macbook Air OSX Yosemite, could that be the reason?



Ehsan Kiani
Rigging TD | Freelance


Ehsan Kiani

unread,
Jun 14, 2015, 8:28:41 PM6/14/15
to python_in...@googlegroups.com
I guess there is another Phonon file here: /Applications/Autodesk/maya2015/Maya.app/Contents/MacOS


Ehsan Kiani
Rigging TD | Freelance


Justin Israel

unread,
Jun 14, 2015, 8:53:50 PM6/14/15
to python_in...@googlegroups.com
On Mon, Jun 15, 2015 at 12:28 PM Ehsan Kiani <ehsanki...@gmail.com> wrote:
I guess there is another Phonon file here: /Applications/Autodesk/maya2015/Maya.app/Contents/MacOS

Then those would be the library files (as opposed to the headers which you previously listed) and it what PyQt is complaining about missing. 

I guess the paths are correct because they are the same as what I was doing in my 2013 recipe:

So if phonon is in the MacOS location, along with the other Qt libs, then I guess it is related to the qt.conf. Unfortunately I don't know what to suggest as I have never tried this build on 2015.
 

Ehsan Kiani

unread,
Jun 15, 2015, 12:59:15 AM6/15/15
to python_in...@googlegroups.com
No problem, thanks for your replies. I will dig more into it and if I had the answer I will share here.



Ehsan Kiani
Rigging TD | Freelance


Reply all
Reply to author
Forward
0 new messages