How to install PyQT 5 on UBUNTU ?

  • I already have qt 5.2 with qt creator installed in my my machine which runs on ubuntu 12.04 LTS. Now i want to install PyQt in in that .. i have no clue where and how to start it. can i use pyqt with the existing qt creator installation.

    i installed qt5.2 using the .run file

    Pls Help me out

  • You should check this web. Following the instructions would give you a nice installation.

  • Tested in ubuntu 15.04

    Download and Install Qtcreator:
    Qt Online Installer for Linux 64-bit
    Install python dev:
    sudo apt-get install python-dev
    Download and Install SIP:
    sip-4.16.7.tar.gz Linux, UNIX, MacOS/X source
    Set QT5 by default:
    sudo apt-get install qt5-default.
    Download and install PyQT:
    PyQt-gpl-5.4.1.tar.gz Linux, UNIX, MacOS/X source

  • Hello,

    I followed the steps above but I still get the following error when trying to run a pyQT program:

    ***Traceback (most recent call last):
    File "", line 10, in <module>
    from PyQt5 import QtWidgets
    ImportError: No module named PyQt5

    (program exited with code: 1)
    Press return to continue***


    It was because I was trying to run the script directly from Geany! - if I run it from the terminal using: python3 it works fine.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.