macOS#

To access the terminal on macOS, use Cmd+Space to enter Spotlight Search, then search for “Terminal” and hit enter to open it. Next, follow these steps to install LabGym.

  1. Install the Xcode command line tools, a software package provided by Apple that includes git and a C/C++ compiler named clang.

    % xcode-select --install
    

    A GUI installation window should pop up. Follow along and accept all the default values.

  2. Install Python 3.10. Scroll down to the bottom and click the macOS 64-bit universal2 installer option. Run the installer and select “Add python to path”.

  3. Upgrade pip, wheel, setuptools.

    % python3 -m pip install --upgrade pip wheel setuptools
    
  4. Install LabGym via pip.

    % python3 -m pip install LabGym
    
  5. Install PyTorch v2.3.1 (Detectron2 needs PyTorch2.3.1 to install).

    % python3 -m pip install torch==2.3.1
    
  6. Install Detectron2.

    % python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
    
  7. Install PyTorch v2.0.1 (Detectron2 needs PyTorch2.0.1 to run).

    % python3 -m pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
    
  8. Launch LabGym.

    % LabGym
    

    The GUI will take a few minutes to start up during the first launch. If the LabGym GUI shows up, you have successfully installed LabGym!

 

If you use pipx, from step #4:

 

  1. Install pipx by following these instructions.

    To test your installation of pipx, close and reopen your terminal window, then type the following command:

    % pipx --version
    1.4.3
    

    If the version number prints successfully, then your installation is working properly. Otherwise, try running the pipx ensurepath command again.

  2. Install LabGym via pipx.

    % pipx install --python python3.10 LabGym
    
  3. Install PyTorch v2.3.1 (Detectron2 needs PyTorch2.3.1 to install) in LabGym’s virtual environment.

    % pipx runpip LabGym install torch==2.3.1
    
  4. Install Detectron2 in the LabGym’s virtual environment.

    % pipx runpip LabGym install 'git+https://github.com/facebookresearch/detectron2.git'
    
  5. Install PyTorch v2.0.1 (Detectron2 needs PyTorch2.0.1 to run) in LabGym’s virtual environment.

    % pipx runpip LabGym install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
    
  6. Launch LabGym.

    % LabGym
    

    The GUI will take a few minutes to start up during the first launch. If the LabGym GUI shows up, you have successfully installed LabGym!