问题
在Mac上使用pyenv安装python时出错:
Installing Python-3.11.6...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 13.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/92/rlh_l4wd4r513j02hvnpjjrw0000gn/T/python-build.20231222095820.4952
Results logged to /var/folders/92/rlh_l4wd4r513j02hvnpjjrw0000gn/T/python-build.20231222095820.4952.log
Last 10 log lines:
checking pkg-config is at least version 0.9.0... yes
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/var/folders/92/rlh_l4wd4r513j02hvnpjjrw0000gn/T/python-build.20231222095820.4952/Python-3.11.6':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** No targets specified and no makefile found. Stop.
解决方案
重新安装xcode
rm -rf /Library/Developer/Command Line Tools
xcode-select --install
本文讲述了在Mac上使用pyenv安装Python3.11.6时遇到的错误,涉及到检查配置、gcc问题和命令行工具安装。解决方案包括重新安装Xcode和清理相关文件。
1480

被折叠的 条评论
为什么被折叠?



