How to Install Pyqt for Python 3 in Ubuntu 14.10?

I found some tutorials online for earlier versions of Ubuntu but they didn't seem to work on Ubuntu 14.10; either that or I was doing it the wrong way.

I want to use Qt Designer to design a GUI, use PyQt to covert it to .py, then use it in Python.

What packages do I need to install to do this?

4 Answers

All the tools you need are included in Ubuntu repositories. You must install the package qtcreator, which has an integrated QtDesigner, and the package pyqt5-dev-tools, which provides pyuic5, a utility that generates Python code from .ui files.

sudo apt-get install qtcreator pyqt5-dev-tools
1

Run these in a Terminal:

sudo apt-get install python3-pyqt5

sudo apt-get install qttools5-dev-tools

sudo apt-get install qtcreator pyqt5-dev-tools

Run PyQt5 Designer, located at:

/usr/bin/designer

Run PyQt5 User Interface Compiler (PYUIC5) to convert .ui to .py

pyuic5 gui.ui -o gui.py

Run PyQt5 Resource Compiler (PYRCC5) to convert .qrc to .py

pyrcc5 images.qrc -o images_rc.py

  1. Install python3.
  2. Install sip.
  3. Install python3-pip.
  4. Run the command: pip3 install pyqt5
3

Well, I documented the steps for Installing pyqt5 with qt designer and code generation here:

With this you can generate the code from Qt Designer itself.

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.