How to install 'labelme' in Macbook M1

Conda Environment

  1. Because anaconda is not suitable for M1, we use miniforge3 instead.
  2. Create new conda environment with 'python=3.9'. (miniforge3 only support python3.9 on M1).

PyQt5

  1. install homebrew (remeber to add path).
  2. brew install pyqt5. Homebrew supports pyqt now.
  3. add path: echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.bashrc and echo 'export PATH="/opt/homebrew/opt/pyqt@5/bin:$PATH"' >> ~/.bashrc. This path may be not suitbale for you. You should modify your path to /qt5@/bin and /qypt@5/bin, and modify your bash profile (~/.zshrc for most Macbook users).
  4. Duplicate the files in /opt/homebrew/Cellar/pyqt@5/5.15.4_1/lib/python3.9/site-packages and paste them to /Users/<username>/miniforge3/envs/<environmentname>/lib/python3.9/site-packages.
  5. source ~/.bashrc (.zshrc)

labelme

  1. labelme can be installed directly via pip (in your conda environemnt)
  2. pip install labelme
  3. when everything is done, labelme to use it.