Question: Now. When I run it. The error comes

> 
> ImportError:
> dlopen(/Users/v/Library/Python/3.8/lib/python/site-packages/PyQt5/QtWidgets.abi3.so,
> 2): no suitable image found. Did find:
> /Users/v/Library/Python/3.8/lib/python/site-packages/PyQt5/QtWidgets.abi3.so:
> mach-o, but wrong architecture
> /Users/v/Library/Python/3.8/lib/python/site-packages/PyQt5/QtWidgets.abi3.so:
> mach-o, but wrong architecture
> 
> 
>

Answer: 
I needed PyQt5 as a dependency for a Python library and this worked for me. See original post [here](https://www.zhihu.com/question/437075754/answer/1993415429).

```
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

```
I had to install `PyQt5==5.15.6`on my MacM1 into an existing virtual environment.

It did not work using all the methods described here.

So, what I did is :

1. [Open the terminal in rosetta mode](https://apple.stackexchange.com/questions/428768/on-apple-m1-with-rosetta-how-to-open-entire-terminal-iterm-in-x86-64-architec)
2. Navigate to my project and activate the virtual environment `source venv/bin/activate`
3. Install the package : `pip install PyQt5==5.15.6`
4. Open a regular terminal into my project and make sure everything was installed as per the requirements.txt : `pip install -r requirements.txt`

Everything is running smoothly, now.