Install PyQt5 on Ubuntu Linux

您所在的位置:网站首页 ubuntu安装pyqt5 Install PyQt5 on Ubuntu Linux

Install PyQt5 on Ubuntu Linux

2023-10-19 15:54| 来源: 网络整理| 查看: 265

Before you start the PyQt5 tutorial you will need to have a working installation of PyQt5 on your system. If you don't have either set up yet, the following steps will guide you through how to do this on Linux.

This guide is also available for macOS and Windows.

Note that the following instructions are only for installation of the GPL licensed version of PyQt. If you need to use PyQt in a non-GPL project you will need to purchase an alternative license from Riverbank Computing to release your software.

Install PyQt5 with pip

The simplest way to install PyQt5 on Linux is to use Python's pip packaging tool, just as for other packages. For Python3 installations this is usually called pip3.

bash pip3 install pyqt5 Install PyQt5 via apt

Packages for PyQt5 are available in the repositories of most distributions, although they may sometimes be out of date. Check first to ensure you're getting an up to date version, and if not use the pip method above. In Ubuntu you can install either from the command line or via "Software Center". The package you are looking for is named python3-pyqt5.

You can also install these from the command line as follows --

bash sudo apt install python3-pyqt5

After install is finished, you should be able to run python (or python3) and import PyQt5 without errors.

python Python 3.7.6 Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt5 >>>

You can now start creating Python GUI applications with PyQt5.

The complete guide to packaging Python GUI applications with PyInstaller. Packaging Python Applications with PyInstaller More info Get the book [[ discount.discount_pc ]]% OFF for the next [[ discount.duration ]] [[discount.description ]] with the code [[ discount.coupon_code ]] Purchasing Power Parity Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]] Well done, you've finished this tutorial! Mark As Complete [[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

Return to Create GUI Applications with PyQt5



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3