When trying to install aitviewer on a machine running macOS with AppleSilicon (M1 Pro), the PyQT5 dependency causes issues by seemingly being stuck in an infinite loop during installation, see Pip Install stuck on "Preparing Wheel metadata..." when trying to install PyQT5.
I have documented steps on how I was able to get around this issue and create a virtual environment with aitviewer installed in it:
-
First, install Python 3.8 and PyQT5 using Homebrew:
brew install python@3.8
brew install pyqt@5
and ensure they necessary paths are discoverable:
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, create an environment with system site packages (for PyQT5):
python3.8 -m venv --system-site-packages <ENV_PATH>
Activate the environment with:
source <ENV_PATH>/bin/activate
-
Install the pyqt5 manually by first upgrading pip:
python -m pip install --upgrade pip
N.B.: Some older versions of pip don't support some of the settings
required below, hence the upgrade.
Then install pyqt5 with:
python -m pip install pyqt5 --config-settings --confirm-license= --verbose
N.B.: This method avoids the issue of installation being stuck:
Pip Install stuck on "Preparing Wheel metadata..." when trying to install PyQT5 - Stack Overflow
N.B.: This step still may take up to 30 minutes to complete.
-
Install aitviewer:
python -m pip install aitviewer
When trying to install aitviewer on a machine running macOS with AppleSilicon (M1 Pro), the PyQT5 dependency causes issues by seemingly being stuck in an infinite loop during installation, see Pip Install stuck on "Preparing Wheel metadata..." when trying to install PyQT5.
I have documented steps on how I was able to get around this issue and create a virtual environment with aitviewer installed in it:
First, install Python 3.8 and PyQT5 using Homebrew:
and ensure they necessary paths are discoverable:
Then, create an environment with system site packages (for PyQT5):
Activate the environment with:
Install the
pyqt5manually by first upgrading pip:Then install
pyqt5with:Install aitviewer: