Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any solution regarding to PyQt library doesn't work in Mac OS Big Sur?

Tags:

python

pyqt

I've done some project using PyQt library for my class assignmnet. And I need to check my application working before I submit it.

Today, 3 hours ago I updated my Mac book OS to Big Sur. And I found out that PyQt library doesn't work. It doesn't show any GUI.

Are there someone know how to fix it?

like image 756
HYUNG JUN GU Avatar asked Nov 13 '20 09:11

HYUNG JUN GU


People also ask

Does PyQt work on Mac?

Desktop applications made with PyQt are cross platform, they will work on Microsoft Windows, Apple Mac OS X and Linux computers (including Raspberry Pi).

Is Macos Bigsur stable?

Features limited to M1 Macs (Bad for Intel and Older devices) Compatibility issues with older 2013 Macbooks (Big Sur supports them all) Stability and bugs with devices (The current Big Sur version 11.4 is very stable)


2 Answers

Adding os.environ['QT_MAC_WANTS_LAYER'] = '1' fixes the issue on PyQT 5.15.1 (credits)

like image 119
Stanislav Tikhomirov Avatar answered Oct 17 '22 06:10

Stanislav Tikhomirov


Rolling back to PyQt5==5.13.0 fixed the issue for me! you should uninstall PyQt5 and then install it using pip install PyQt5==5.13.0

like image 35
ucktrk Avatar answered Oct 17 '22 05:10

ucktrk