在 macOS Big Sur 上使用 Homebrew 错误将 Python 3.8 降级到 3.7

问题描述

我正在尝试按照指定的 Homebrew 方法 here 在 macOS Big Sur 上将 Python 3.8.2 降级到 Python 3.7.0。

但是,在执行 pyenv install 3.7.0 命令时,我遇到了如下无法解决错误

bash-3.2$ pyenv install 3.7.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/python-3.7.0.tar.xz
Installing python-3.7.0...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD Failed (OS X 11.1 using python-build 1.2.21-6-g2bf6111f)

Inspect or clean up the working tree at /var/folders/gf/g7tsgb6x4l9gyms1jm5kmlsc0000gn/T/python-build.20210108113802.24514
Results logged to /var/folders/gf/g7tsgb6x4l9gyms1jm5kmlsc0000gn/T/python-build.20210108113802.24514.log

Last 10 log lines:
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/var/folders/gf/g7tsgb6x4l9gyms1jm5kmlsc0000gn/T/python-build.20210108113802.24514/python-3.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found.  Stop.

这种方法有什么解决方法吗? 是否建议卸载 Python 3.8.2 并使用 Python 3.7.0 进行全新安装?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)