Homebrew是 mac的包管理器,仅需执行相应的命令,就能下载安装需要的软件包,可以省掉自己去下载、解压、拖拽(安装)等繁琐的步骤
1.安装python后的事儿
安装完成以后还需要进行python重命名,在终端输入:
alias python="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"
使用后在终端输入python直接就是python3.7版本,但是经过实验下一次开启终端再次输入依旧是python2.7
2.安装home brew
以下采用中科大的镜像安装home brew
速度更快
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
替换 brew.git:
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
替换 homebrew-core.git:
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
3.安装labellmg
labelImg压缩包下载地址:
https://github.com/tzutalin/labelImg
下载 qt 和 xml
brew install qt qt5
brew install libxml2
labellmg文件夹进入方法为 打开终端-〉cd -〉将文件夹拖入终端
输入make qt5py3
输入python labelImg.py即可打开labellmg
(which python3即可找到python3.7的安装路径)python3命令是一种软链接,并不是可以执行的文件,真正可以执行的文件是python3.7