Open In App

How to Install PyQt for Python3 on Ubuntu?

Improve
Improve
Like Article
Like
Save
Share
Report

PyQt is a Python binding of the cross-platform GUI toolkit Qt. It is implemented as a Python plug-in and developed by the British firm Riverbank Computing. It implements approximately 440 classes and 6,000 functions and methods. It is not installed by default, so to use this we have to install it in our system. It is used to create desktop applications with the help of the Python language.

Features of PyQt:

  • It is a substantial set of Graphic User Interface(GUI) widgets
  • It provides various classes for accessing SQL databases
  • It provides data-aware widgets. These widgets are automatically populated from a database.
  • It is an XML parser
  • It provides SVG support
  • It provides various classes for embedding ActiveX controls on Windows

Installing PyQt for Python on Linux

Follow the below steps to install Python PyGObject in Linux:

Step 1: Check if Python is installed or not on your system. Here, we use the below command in the terminal to check if the Python is already installed in the Linux system or not. In case Python is already installed on your system then the output will be the current version of Python and if it is not installed it will throw an error. For installing python in your system refer to How to Install Python.

python3.9  –version

Checking-if-Python-is-installed-or-not

Step 2: This step is to update the Linux used by the user to get the latest version so that it can make the process much faster and the system updates will make the installing easily without facing any issue.

sudo apt-get update

Updating-the-Linux

Step 3: Install the PyQt. Here, it is the final step to install the PyQt in python just the user needs to type the below-mentioned command in the working Linux terminal and the PyQt will be successfully installed in the system.

sudo apt-get install python-pyqt5

Installing-the-PyQt-package

Verifying PyQt installation on Linux

For ensuring the installation of pyqt on our system, we can use the following import command in the Python terminal. If there is an error while importing the module then it means it is not installed properly.

import PyQt5

Verifying-PyQt-installation


Last Updated : 31 Jan, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads