How to install PyQt5 on Mac?

I am trying to install PyQt5 on my Mac, but I do not know how to use it. I tried to install sip do

cd ~/Downloads/sip-4.17
python configure.py

which worked and then I tried

cd ~/Downloads/PyQt-gpl-5.5.1
python configure.py --qmake /Users/name/Qt/5.5/clang_64/bin/qmake

which returns an error message

Make sure you have a working sip on your PATH or use the --sip argument to explicitly specify a working sip.

How to fix this error? I did not install sip?

+9
source share
6 answers

I kinda shy away from the question, but the easiest way is to install Homebrew and just run brew install pyqtor brew install pyqt5.

+16
source

PyQt5 macOS. Homebrew. Qt5, PyQt5 -

python3 -m pip install PyQt5

Python:

Collecting PyQt5
  Downloading PyQt5-5.9-5.9.1-cp35.cp36.cp37-abi3-macosx_10_6_intel.whl 
(82.2MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 82.2MB 17kB/s 
Collecting sip<4.20,>=4.19.3 (from PyQt5)
  Downloading sip-4.19.3-cp36-cp36m-macosx_10_6_intel.whl (49kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 1.2MB/s 
Installing collected packages: sip, PyQt5
Successfully installed PyQt5-5.9 sip-4.19.3

: CPython 3.5, 3.6 3.7.

, : PySide2 , , .

2017/09/25: ,

pip3 install PyQt5

pip/pip2/pip3 , .

, PyQt5 . , , .

: PySide2 , :

$ python3 -m pip install PySide2
Collecting pyside2
  Downloading https://files.pythonhosted.org/packages/2a/e2/2dc134a5c475f661d5ff2ab587fbd2c285db3d064e03ac9b4a2ee0958400/PySide2-5.12.2-5.12.2-cp35.cp36.cp37-abi3-macosx_10_12_intel.whl (109.8MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 109.8MB 238kB/s 
Collecting shiboken2==5.12.2 (from pyside2)
  Downloading https://files.pythonhosted.org/packages/bd/8b/a2ad76c3a935fae51f0ed9b150a9df08167c4550fcd07637f0db19c31849/shiboken2-5.12.2-5.12.2-cp35.cp36.cp37-abi3-macosx_10_12_intel.whl (691kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 696kB 1.6MB/s 
Installing collected packages: shiboken2, pyside2
Successfully installed pyside2-5.12.2 shiboken2-5.12.2

, , . https://wiki.qt.io/Qt_for_Python/Reporting_Bugs

+26

SIP, configure.py:

>>> cd ~/Downloads/sip-4.17
>>> python configure.py
>>> make
>>> make install

PyQt5:

>>> cd ~/Downloads/PyQt-gpl-5.5.1
>>> python configure.py --qmake /Users/name/Qt/5.5/clang_64/bin/qmake
>>> make
>>> make install
+2

~/.pip/pip.log :

Skipping https://pypi.python.org/packages/... (from https://pypi.python.org/simple/pyqt5/) because it is not compatible with this Python

​​ Python 3 pip3 install PyQt5 - .

0

Qt - C++, API . , , NFC Bluetooth, - Chromium, .

PyQt5 - Python Qt v5. 35 Python C++ , iOS Android.

PyQt5 C++, .

     pip install PyQt5
0

Qt has a Mac.dmg installer with all components. First, I uninstalled my version of pip and installed my Qt in a standard folder - I tried putting it in / opt / Qt, as suggested in another post, but this failed due to changes in MacOS permissions in Mojave. Next to the Qt element is an extension triangle that allows you to install Designer separately from the Qt engine and development and development tools for 2D / 3D and the platform.

Qt Installer:

https://www.qt.io/download-qt-installer

0
source

Source: https://habr.com/ru/post/1622666/


All Articles