labelImg macos 运行环境设置
MacOS brew 安装
-
安装
CLT for Xcode
,检查git/bash/curl
存在xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
此提示表示已经安装。 -
设置清华源环境变量
export HOMEBREW_INSTALL_FROM_API=1 export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api" export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles" export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" export HOMEBREW_PIP_INDEX_URL="https://pypi.tuna.tsinghua.edu.cn/simple"
-
从镜像源安装 homebrew
# 克隆仓库 git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install # 执行安装脚本 /bin/bash brew-install/install.sh # 删除仓库 rm -rf brew-install
-
写入本地用户
zsh profile
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> ~/.zprofile
labelImg 环境准备
-
brew 安装
qt@5
版本brew install qt@5
-
安装其它依赖
brew install libxml2
运行项目
-
克隆项目
git clone https://github.com/HumanSignal/labelImg.git
-
将
终端(Terminal)
切换至labelImg
目录# 一般会克隆至该目录,根据实际情况进行改变 cd ~/labelImg
-
创建虚拟环境
python3 -m venv .venv
-
激活虚拟环境
source .venv/bin/activate
-
安装 python 包
pip3 install -r requirements/requirements-linux-python3.txt
-
执行安装脚本
# 执行预处理步骤 make qt5py3 # 启动脚本 python3 labelImg.py