0

I installed PyQt4 on Ubuntu 14.04 via conda. All the GUI library is working but no output devices are found, so I get no audio output, using PyQt4.QtMultimedia (or PyQt4.QtGui.QSound).

A sample script describing the situation:

from PyQt4.QtMultimedia import QAudioDeviceInfo

device_info = QAudioDeviceInfo.defaultOutputDevice()
if device_info.isNull():
    print 'No output audio device found'  # always executed
else:
    print device_info  # never executed

Finding an audio output device is obviously required to play audio with PyQt4 (as I've verified).

In general, with my Ubuntu, I can listen audio and music, so is not and hardware problem.

In Windows and OS X the same code do find an audio device.

How could I solve this problem?

iacopo
  • 663
  • 1
  • 7
  • 22
  • So what happens if you install pyqt4 without using conda? – ekhumoro Oct 06 '14 at 16:14
  • To me it happens that [QtMultimedia is not available](https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/590140). – iacopo Oct 06 '14 at 17:13
  • If the conda/ubuntu packages are broken, you could try [building everything yourself](http://pyqt.sourceforge.net/Docs/PyQt4/installation.html). If you haven't done this before, I would advise installing a separate dev python *first* (under `/usr/local` or soemthing), and then compile everything else against that (e.g. configure pyqt with `/usr/local/python2.7 configure-ng.py`). This should ensure that you don't inadvertently mess up your system python. – ekhumoro Oct 06 '14 at 18:01

0 Answers0