I am attempting to install PyQt5 on my Ubuntu box. I have been able to install the packages for Python 3, however,I have code that depends on pygraphviz which has a hard dependency on Python 2.7.

I was looking through the repos and I see that there is a package for it:

python-pyqt5 (5.3.2+dfsg-1ubuntu1)

So I try the following:

sudo apt-get install python-pyqt5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python-pyqt5

SO I downloaded the package and attempted to install manually:

sudo dpkg -i python-pyqt5_5.3.2+dfsg-1ubuntu1_amd64.deb 
Selecting previously unselected package python-pyqt5.
(Reading database ... 253766 files and directories currently installed.)
Preparing to unpack python-pyqt5_5.3.2+dfsg-1ubuntu1_amd64.deb ...
Unpacking python-pyqt5 (5.3.2+dfsg-1ubuntu1) ...
dpkg: dependency problems prevent configuration of python-pyqt5:
 python-pyqt5 depends on libqt5core5a (>= 5.3.0); however:
  Version of libqt5core5a:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
 python-pyqt5 depends on libqt5gui5 (>= 5.3.0) | libqt5gui5-gles (>= 5.3.0); however:
  Version of libqt5gui5:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
  Package libqt5gui5-gles is not installed.
 python-pyqt5 depends on libqt5help5 (>= 5.3.0); however:
  Version of libqt5help5:amd64 on system is 5.2.1-8build1.
 python-pyqt5 depends on libqt5network5 (>= 5.3.0); however:
  Version of libqt5network5:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
 python-pyqt5 depends on libqt5printsupport5 (>= 5.3.0); however:
  Version of libqt5printsupport5:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
 python-pyqt5 depends on libqt5widgets5 (>= 5.3.0); however:
  Version of libqt5widgets5:amd64 on system is 5.2.1+dfsg-1ubuntu14.3.
 python-pyqt5 depends on qtbase-abi-5-3-0; however:
  Package qtbase-abi-5-3-0 is not installed.
 python-pyqt5 depen
dpkg: error processing package python-pyqt5 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

I see that I may have some outdated packages I have attempted to update using apt-get update with no results.

I have downloaded source to build; however, I would rather use package management to control dependencies. Is there any advice on how to resolve this using apt?

Thank you for your help! Joseph

  • apt-get install -f Aug 17, 2015 at 15:44
  • I have attempted this. It appears to be marking python-pyqt5 for removal
    – Joseph
    Aug 17, 2015 at 16:51

2 Answers 2


I have found my answer for this question here: https://riverbankcomputing.com/pipermail/pyqt/2014-May/034175.html

Basically, it seems that the Python 2 versions of PyQt5 were left out of the Ubuntu 14.04 repos; however, they seem to be included in 14.10.

So, I installed PyQt5 from source which was not without its own woes: https://stackoverflow.com/questions/32080304/issues-with-building-pyqt5-on-ubuntu-14-04

At any rate, I now have PyQt5 installed on my box.

  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – user.dz
    Aug 19, 2015 at 19:04
  • Thanks for the advice. I have updated my answer and also provided a link for the process that I used to get up and running.
    – Joseph
    Aug 19, 2015 at 20:51

I highly recommend you to install Anaconda and install it using conda

conda install pyqt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .