[PyQt] pyqt does not find phonon (from kde.org) at build time

Matt Carlson mcarlson1 at gmail.com
Sun Feb 28 13:21:34 GMT 2010

Hi, I think I'm having the same problem described in the message below 
(or at least a similar one). I tried using the latest stable source 
package for PyQt 4.7 and also the latest development snapshot (as of 
Feb. 28). With both installations, I get an import error when I try to 
use phonon. It seems to be the same problem with configure.py. When 
configure.py runs it does not list phonon when "creating the makefile" 
and "generating the C++ source."

I'm not sure if the patch that solsTiCe included would fix my problem. 
Using it is beyond my skill level. So, I searched around a little bit 
more and found another person describing a similar problem with version 
4.6: http://trac.macports.org/ticket/22370. This led me to try 
installing version 4.5, which got phonon working for me. I'm not sure 
exactly what this means, but I'm guessing someone else might.

Although version 4.5 should work fine for what I need to do, I spent a 
while trying to figure out how to make 4.7 work. I checked (or tried to 
check) if I had phonon installed with Qt, reinstalled some Qt libraries, 
and tried listing phonon in the plugin configure.py option. It's very 
likely this is still just a problem for me, but it seems like there's a 
chance other people are still having this problem too. If anyone would 
like to help me troubleshoot this, let me know what other information 
you need. I'm using Ubuntu 8.10 and Python 2.5.2.

Matt Carlson

On Fri, 19 Feb 2010 19:50:26 +0100, solsTiCe d'Hiver
<solstice.dhi... at gmail.com> wrote:
> hi.
> [in case my previous mail has been blocked, here it is again]
> i had the surprise to get an import error when using pyqt 4.7 and qt 4.6
> about Phonon from PyQt4.phonon.
> I found that the package of pyqt on archlinux was missing the phonon
> module. It's not because the package has not been built with phonon
> installed on the machine building pyqt but because configure.py can't
> find phonon from kde.org (with the funny headers .h)
> so i had to use this patch to make it work
> --- configure.py      2010-01-14 15:36:17.000000000 +0100
> +++ configure.py      2010-02-19 13:53:45.000000000 +0100
> @@ -362,7 +362,7 @@
>          check_module("QtWebKit", "qwebpage.h", "new QWebPage()")
>          check_module("QtXml", "qdom.h", "new QDomDocument()")
>          check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()")
> -        check_module("phonon", "Phonon/VideoWidget",
> +        check_module("phonon", "phonon/videowidget.h",
>                  "new Phonon::VideoWidget()")
>          check_module("QtAssistant", "qassistantclient.h",
>                  "new QAssistantClient(\"foo\")",
> extra_lib_dirs=ass_lib_dirs,
> i have been told on #pyqt to email this.

Already fixed in current snapshots.

PyQt mailing list    PyQt at riverbankcomputing.com

More information about the PyQt mailing list