본문 바로가기
PyQt5_

Installing PyQt6

by 자동매매 2023. 3. 16.

Appendix A: Installing PyQt6

Before you start coding you will first need to have a working installation of PyQt6 on your system. If you don’t have PyQt6 set up yet, the following sections will guide you through how to do this on Windows, macOS and Linux.

q

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.

Installation on Windows

PyQt6 for Windows can be installed as for any other application or library. As of Qt 5.6 installers are available to install via PyPi, the Python Package archive. To install PyQt6 from Python3 simply run —

pip3 install pyqt6

After install is finished, you should be able to run python and import PyQt6.

Note that if you want access to Qt Designer or Qt Creator you will need to download this from the Qt downloads site.

Installation on macOS

If you already have a working installation of Python 3 on macOS, you can go ahead and install PyQt6 as for any other Python package, using the following —

pip3 install pyqt6

If you don’t have an installation of Python 3, you will need to install one first. You can download macOS installers for Python 3 from the Python homepage. Once

installed, you should be able to use the pip3 install command above to install PyQt6.

Another alternative is to use Homebrew. Homebrew is a package manager for command-line software on macOS. Homebrew has both Python 3 and PyQt6 available in their repositories.

Figure 274. Homebrew — the missing package manager for macOS.

To install homebrew run the following from the command line —

ë

This is also available to copy and paste from the Homebrew

homepage.

Once Homebrew is installed you can then install Python with —

brew install python3

With Python installed, you can then install PyQt6 as normal, using pip3 install pyqt6, or alternatively choose to install it using Homebrew with —

brew install pyqt6

Installation on Linux

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

pip3 install pyqt6

Once the installation is finished, you should be able to run python3 (or python depending on your system) and import PyQt6.

 

'PyQt5_' 카테고리의 다른 글

PyQt6 and PySide6 —What’s the difference?  (0) 2023.03.16
Translating C++  (0) 2023.03.16
Moonsweeper  (0) 2023.03.16
Mozzarella Ashbadger  (0) 2023.03.16
Using Custom Widgets in QtDesigner  (0) 2023.03.16

댓글