微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决在 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 举报,一经查实,本站将立刻删除。