Skip to content

Installation Issue on macOS with Apple Silicon #22

@smueksch

Description

@smueksch

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:

  1. 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
    
  2. 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
  3. 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.

  4. Install aitviewer:

    python -m pip install aitviewer
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions