<div dir="ltr"><p>Hi all, I’ve been trying to get PyQt4 to work with Linux (specifically Ubuntu
14.04). I have one copy of Ubuntu running in a virtual machine and
another on a laptop. I’ve had two separate problems.</p><p><br></p>
<p><b>Problem 1:</b></p>
<p>The copy of PyQt4 on the laptop can’t use Phonon at all. Just running<br></p><p> from PyQt4.<span>phonon</span> import Phonon</p>
generates <b>ImportError: “No module named phonon”</b>
<p>And after much searching I’m not sure how to fix this. Maybe by installing some other kind of Phonon backend and adding it to <span>PYTHONPATH</span> or something?<br></p><p><br></p>
<p><b>Problem 2:</b></p>
<p>Strangely, the virtual machine copy of PyQt4 (installed using the
exact same procedure, but with a slightly older version of Ubuntu, 13.10)
behaves differently. On the virtual machine, I can import Phonon fine,
but I trying to build the program into an executable via cx_Freeze gives
this error:</p>
<p><b>ImportError: No module named 'PyQt4.uic.port_v3.proxy_base'</b></p>
<p>Supposedly this is fixable by forcing cx_Freeze to include ‘sip’ in the build, but that doesn’t work.</p><p>Maybe this is related: I did get this error when running "make install" on PyQt4, but apparently that's normal:</p>
<p><b>strip:home/USERNAME/.pyenv/versions/2.7.8/bin/pyuic4: File format not recognized</b></p>
<p>A note on my PyQt4 installation: I’ve installed the default <span>SIP</span>
and PyQt4 by downloading the tar files, extracting them, and
configuring and making and installing them. I have added PyQt to
LD_LIBRARY_PATH.</p>
<p>Any advice on solving either or both of these two problems would be appreciated.</p></div>