MacOS安装Python
本地系统版本是10.15.6
命令行安装
- 搜索Python
brew search python
- 安装Python
brew install python@3.7
admin@admindeMBP ~ % brew search python3
==> Formulae
boost-python3 python@3.7 python@3.8 python@3.9
If you meant "python3" specifically:
It was migrated from homebrew/cask to homebrew/core.
admin@admindeMBP ~ % brew install python@3.7
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/gdbm-1.19.catalina.
#=#=#
curl: (22) The requested URL returned error: 404
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/manifests/1.19
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gdbm/blobs/sha256:a3e43170a1d84
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/mpdecimal-2.5.1.cat
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/openssl%401.1-1.1.1
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/readline-8.1.catali
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/sqlite-3.35.4.catal
curl: (22) The requested URL returned error: 404
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.35.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:a1aee82c8de
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/xz-5.2.5.catalina.b
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/python%403.7-3.7.10
curl: (22) The requested URL returned error: 404
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.7/manifests/3.7.10_3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.7/blobs/sha256:838cb30
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Installing dependencies for python@3.7: gdbm, mpdecimal, openssl@1.1, readline, sqlite and xz
==> Installing python@3.7 dependency: gdbm
==> Pouring gdbm-1.19.catalina.bottle.tar.gz
tar: Error opening archive: Failed to open '/Users/admin/Library/Caches/Homebrew/downloads/518faa90b0eabcd7ae54ba16397e0454a6a5b64f3709313a6c13050dfe46106f--gdbm-1.19.catalina.bottle.tar.gz'
安装包安装
下载地址:
https://www.python.org/downloads/mac-osx/