Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue on macOS with Apple Silicon #22

Closed
smueksch opened this issue Mar 9, 2023 · 4 comments
Closed

Installation Issue on macOS with Apple Silicon #22

smueksch opened this issue Mar 9, 2023 · 4 comments

Comments

@smueksch
Copy link

smueksch commented Mar 9, 2023

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
    
@kaufManu
Copy link
Contributor

kaufManu commented Mar 9, 2023

Thanks for reporting this. If anyone else is experiencing a similar issue in the future, but these instructions don't help, feel free to re-open the issue.

@kaufManu kaufManu closed this as completed Mar 9, 2023
@y0-0n
Copy link

y0-0n commented Jun 26, 2023

xcode-select --install
also is required to install. I think it's required on Mac include Intel.

@kaufManu
Copy link
Contributor

v1.12.0 now supports PyQt6, which makes it easier to install on MacOS. To use PyQt6, install as follows:

AITVIEWER_INSTALL_PYQT6=1 pip install --no-binary=aitviewer aitviewer

Then configure the viewer to use PyQt6, e.g. from code:

from aitviewer.configuration import CONFIG as C
C.window_type = "pyqt6"

For other ways to configure this (i.e. via configuration file), check the docs here.

@VimalMollyn
Copy link

VimalMollyn commented Jan 22, 2024

Here's a full install with conda:

conda create -n "aitviewer" python=3.9
conda activate aitviewer
conda install pytorch::pytorch torchvision torchaudio -c pytorch
python -m pip install PyQt6
AITVIEWER_INSTALL_PYQT6=1 pip install --no-binary=aitviewer aitviewer
python -m pip install chumpy
python -m pip install numpy==1.23.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants