使用Pyenv安装Python 3.11失败,寻求解决方案
pyenv安装Python 3.11失败(C编译器无法生成可执行文件)
学校项目要求在本地目录使用cmu_graphics库生成图片,由于该库不支持Python 3.12,我尝试通过pyenv安装Python 3.11,执行命令:pyenv install 3.11,但安装失败,错误日志如下:
~ % pyenv install 3.11 python-build: use openssl@3 from homebrew python-build: use readline from homebrew Downloading Python-3.11.7.tar.xz... -> https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tar.xz Installing Python-3.11.7... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 12.7.3 using python-build 20180424) Inspect or clean up the working tree at /tmp/python-build.20240130084550.73534 Results logged to /tmp/python-build.20240130084550.73534.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 `/tmp/python-build.20240130084550.73534/Python-3.11.7': configure: error: C compiler cannot create executables See `config.log' for more details make: *** No targets specified and no makefile found. Stop.
我已尝试执行brew reinstall make重装make,但仍出现相同错误。
内容的提问来源于stack exchange,提问作者Aaron Li
相关产品推荐
相关产品推荐

