已安装 Command Line Tools (CLT)
发布时间:2025-06-24 18:02:04 作者:北方职教升学中心 阅读量:008
Instead, it is recommended that you transition to using 'python3' from within Terminal.。 skyhx@HXdeMacBook-Pro ~ % more .zprofile export HOMEBREW_PIP_INDEX_URL=http://mirrors.aliyun.com/pypi/simple #ckbrew export HOMEBREW_API_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles/api #ckbrew export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles #ckbrew eval $(/usr/local/Homebrew/bin/brew shellenv) #ckbrewskyhx@HXdeMacBook-Pro ~ %。因为macOS 10.15.7是旧版本,建议使用国内镜像源加快安装过程。
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git。
skyhx@HXdeMacBook-Pro bin % brew install python@3.7Warning: No available formula with the name "python@3.7". Did you mean python@3.9, python@3.8, python@3.13, python@3.12, python@3.11, python@3.10 or python-yq?==> Searching for similarly named formulae and casks...==> Formulaepython@3.9 python@3.13 python@3.11 python-yqpython@3.8 python@3.12 python@3.10To install python@3.9, run: brew install python@3.9skyhx@HXdeMacBook-Pro bin % skyhx@HXdeMacBook-Pro bin %。This version is included in macOS for compatibility with legacy software. 。
gitee安装。
可使用以下步骤。
刷新环境变量。
Python用Homebrew安装 3:
skyhx@HXdeMacBook-Pro bin % brew install python@3.8==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api/formul#=#=-# # ==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api/cask.j##O#- # Warning: You are using macOS 10.15.We (and Apple) do not provide support for this old version.It is expected behaviour that some formulae will fail to build in this old version.It is expected behaviour that Homebrew will be buggy and slow.Do not create any issues about this on Homebrew's GitHub repositories.Do not create any issues even if you think this message is unrelated.Any opened issues will be immediately closed without response.Do not ask for help from Homebrew or its maintainers on social media.You may ask for help in Homebrew's discussions but are unlikely to receive a response.Try to figure out the problem yourself and submit a fix as a pull request.We will review it but may or may not accept it.Error: python@3.8 has been disabled because it is deprecated upstream! It was disabled on 2024-10-14.skyhx@HXdeMacBook-Pro bin %。已安装 Command Line Tools (CLT)。 It was disabled on 2024-10-14.skyhx@HXdeMacBook-Pro bin %。:
bash复制。
xcode-select --install。Type "help", "copyright", "credits" or "license" for more information.。
安装 Command Line Tools。
权限问题。
安装前准备。
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
进入界面。
ls -a 隐藏的文件信息可以看到。国内地址将无效。重置镜像源(恢复官方源):
# 重置 brew.git。
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin。
Future versions of macOS will not include Python 2.7. 。
Python 2.7.16 (default, Jun 5 2020, 22:59:21) 。

选择的2。:
macOS 10.15.7。
Homebrew 4.4.16。
skyhx@HXdeMacBook-Pro bin % python。
/Users/skyhx。
sudo chown -R $(whoami) $(brew --prefix)/*。继续。
更新git。
不知道为啥 清华源失败。
安装python3.7。
source /Users/skyhx/.zprofile。
查看 Homebrew 版本。
source /Users/skyhx/.zprofile。:
skyhx@HXdeMacBook-Pro bin % brew --version。
安装成功 但也需要重启终端 或者 运行 source /Users/skyhx/.zprofile 否则,
sudo chown -R $(whoami) $(brew --prefix)/*。
确保系统要求。
skyhx@HXdeMacBook-Pro ~ % pwd。
source /Users/skyhx/.zprofile。
WARNING: Python 2.7 is not recommended. 。