Mac下安装Brew
1、确保网络环境可以翻墙
2、安装xcode:
xcode-select --install
3、安装brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
不翻墙的情况下运行(使用国内的镜像安装):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
4、配置环境变量:
echo >> /Users/frank/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/frank/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
5、测试:
brew --version
------------------------------------------
更换brew镜像源:
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zprofile
source ~/.zprofile
brew update
安装Python的命令:
回复删除brew install python
brew install uv
回复删除