We Are Going To Discuss About How can i run pyqt5 on my mac with M1chip. So lets Start this Python Article.
How can i run pyqt5 on my mac with M1chip
- How to solve How can i run pyqt5 on my mac with M1chip
After hours of trial and error, I was finally able to solve this. My successful configuration is:
Open terminal with Rosetta 2 (https://dev.to/courier/tips-and-tricks-to-setup-your-apple-m1-for-development-547g)
Use non-homebrew python (mine was in /usr/bin/python3) to create virtual environment/usr/bin/python3 -m venv env source env/bin/activate
Upgrade pippip install --upgrade pip
Install PyQt5pip install PyQt5
- How can i run pyqt5 on my mac with M1chip
After hours of trial and error, I was finally able to solve this. My successful configuration is:
Open terminal with Rosetta 2 (https://dev.to/courier/tips-and-tricks-to-setup-your-apple-m1-for-development-547g)
Use non-homebrew python (mine was in /usr/bin/python3) to create virtual environment/usr/bin/python3 -m venv env source env/bin/activate
Upgrade pippip install --upgrade pip
Install PyQt5pip install PyQt5
Solution 1
After hours of trial and error, I was finally able to solve this. My successful configuration is:
- Open terminal with Rosetta 2 (https://dev.to/courier/tips-and-tricks-to-setup-your-apple-m1-for-development-547g)
- Use non-homebrew python (mine was in /usr/bin/python3) to create virtual environment
/usr/bin/python3 -m venv env
source env/bin/activate
- Upgrade pip
pip install --upgrade pip
- Install PyQt5
pip install PyQt5
Original Author executeinstaller Of This Content
Solution 2
I needed PyQt5 as a dependency for a Python library and this worked for me. See original post here.
brew install pyqt5
echo 'export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/[email protected]/5.15.4_1/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Original Author ejames Of This Content
Solution 3
What I ended up doing specifically for pyqt5
was:
brew install [email protected]
I think for versions 4 and 6 this may work as well. When I went simply brew install pyqt
that didn’t work unfortunately.
note this is M1 Macbook only
One other thing to try as things settle down with M1s is to try pip3 install pyqt5
in a terminal launched in Rosetta mode (left click -> Get Info -> Open in Rosetta)
Original Author LemurPwned Of This Content
Solution 4
Try installing the pyqt under the ARM architecture as below
arch -arm64 brew install pyqt
Original Author Chats Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.