Pyenv had been working for me without issue for years. Not sure what happened (or what I did) that led to it suddenly not able to install any versions. I've tried uninstalling and reinstalling pyenv to no avail. Would appreciate any assistance, the output said to file a bug report.
macOS Monterey 12.2.1, 2.4 GHz 8-Core Intel Core i9
pyenv 2.2.4
attempting to install python version 3.8.12 (but no versions seem to install now)
$ gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ pyenv install 3.8.12
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Installing Python-3.8.12...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 12.2.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/f1/3g092d_11zl8xnf67bp0n79r0000gp/T/python-build.20220318172446.23811
Results logged to /var/folders/f1/3g092d_11zl8xnf67bp0n79r0000gp/T/python-build.20220318172446.23811.log
Last 10 log lines:
checking for --with-cxx-main=<compiler>... no
checking for clang++... no
configure:
By default, distutils will build C++ extension modules with "clang++".
If this is not intended, then set CXX on the configure command line.
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a bug report
make: *** No targets specified and no makefile found. Stop.
Apologies if I did anything wrong, let me know if I can provide anything else.
I tried specifying to use the zlib from homebrew based on the instructions listed in Common Build Problems and got the same error:
CPPFLAGS="-I$(brew --prefix zlib)/include" pyenv install 3.8.12
also tried specifying gcc as the CC but got the same error:
CC=gcc pyenv install 3.8.12
also tried uninstalling and reinstalling the xcode command line tools for mac but got the same error.