Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 1.16 KB

macm1pyqt.md

File metadata and controls

49 lines (35 loc) · 1.16 KB
author title date tags categories
Irony
如何在Mac M1上快速安装PyQt5
2023-10-07 07:08:06 -0700
PyQt
Mac
M1
笔记

由于官方并没有在M1上编译PyQt导致安装存在一些问题。 M1上的Python不能直接使用x64的 PyQt5。但是M1上可以运行x64的Python。所以通过安装x64的Python然后再安装PyQt5即可。

1. 安装Python python-3.9.13-macosx10.9.pkg

2. 勾选自定义同时只勾选安装pip

step1.png

step1.png

3. 设置pip源

/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install pqi
/Library/Frameworks/Python.framework/Versions/3.9/bin/pqi use tuna

4. 安装PyQt5

/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install PyQt5

5. 测试

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3

step3.png

📢📢📢

也可以直接安装 Miniconda

然后:conda install -c conda-forge pyqt