Hi Guys after i buy the Mac Book 2020 pro i found the PyQt5 lib can't install@python, So i found the way to solve the problem, share you.
Befor start to install PyQt you need install homebrew and python3.9
- run these command first
brew install pyqt5
echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/pyqt@5/5.15.4_1/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
- then move the lib file from homebrew to python lib path
from
/opt/homebrew/Cellar/pyqt@5/5.15.4_1/lib/python3.9/site-packages
all file move to
/Users/[you account name]/miniforge3/lib/python3.9/site-packages
- verify
(base) mac-guo@MAC-GUOdeMBP ~ % python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:24:02)
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5
if normal congratulation you installed PyQt5 successed. Otherwise you are failed, please see the detail what print.
Best Regards.
Thanks!