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 was hoping to install pyqt5 on my M1 mac *without* Rosetta. I was using it as a dependency of another project that I wanted to install in a venv which requires pyqt5 and was not installable via pipx (`urh`).

Unfortunately, there currently are no compatible wheels (`curl --silent "https://pypi.org/pypi/PyQt5/json" | grep -i arm64`), and attempting to install on 3.10 fails with `AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'`

Thankfully, the homebrew installation of pyqt5 is compiled for arm64 and works well.

My steps were:

```bash
$ # Install pyqt5 via homebrew
$ brew install pyqt@5
$ # Note that it's installed in python3.9, not 3.10
$ brew cat pyqt@5 | grep 'depends_on.*python'
  depends_on "python@3.9"
$ # Make a python3.9 virtualenv with access to the system's site-packages
$ /opt/homebrew/bin/python3.9 -m venv --system-site-packages .venv
$ source .venv/bin/activate

```

At this point I was able to install `urh` into the virtualenv, using the arm64-compiled pyqt5 from hombrew, without neededing Rosetta (and without needing to further "pollute" my system site-packages), and it runs as expected (since the question was about *running*).
I was struggling with installing PyQt5 on M1 mac with MacOS 12.6 (Monterey) inside a virtual environment (using python 3.9). The final solution that worked for me was to use conda for creating and activating the virtual environment.

`conda create --name venv python=3.9` `conda activate venv`

And then simply using conda to install PyQt5 as part of the pyqt package.

`conda install pyqt`