labelImg macos 运行环境设置
labelImg macos 运行环境设置
MacOS brew 安装
-
安装
CLT for Xcode,检查git/bash/curl存在xcode-select --installxcode-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 -i https://mirror.baidu.com/pypi/simple -
执行安装脚本
# 执行预处理步骤 make qt5py3 # 启动脚本 python3 labelImg.py

浙公网安备 33010602011771号