小编jes*_*son的帖子

pyenv 配置:错误:C 编译器无法创建可执行文件

我正在尝试在运行 MacOS Big Sur v11.1 的笔记本电脑上安装多个版本的 Python。我最初通过此处的说明安装了 xcode 命令行工具、自制软件和 python

xcode-select --install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

brew install python

但是后来不由自主地将python升级到3.9,我需要回到3.7.9。所以我安装了 pyenv 并尝试按照此处的说明安装 python 3.7.9

brew install pyenv

pyenv install 3.7.9

但是我遇到了以下错误:

/var/folders/8n/ml0qwc091w9bhpszzxy9djl00000gn/T/python-build.20210118111111.56108 /usr/local/Cellar
/var/folders/8n/ml0qwc091w9bhpszzxy9djl00000gn/T/python-build.20210118111111.56108/Python-3.7.9 /var/folders/8n/ml0qwc091w9bhpszzxy9djl00000gn/T/python-build.20210118111111.56108 /usr/local/Cellar
checking build system type... x86_64-apple-darwin20.2.0
checking host system type... x86_64-apple-darwin20.2.0
checking for python3.7... no
checking for python3... python3
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... …
Run Code Online (Sandbox Code Playgroud)

python macos gcc pyenv macos-big-sur

14
推荐指数
3
解决办法
5938
查看次数

标签 统计

gcc ×1

macos ×1

macos-big-sur ×1

pyenv ×1

python ×1