I cannot install any version of pyenv. When I type
pyenv install 3.12.4
I always get the message:
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.12.4.tar.xz...
-> https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tar.xz
Installing Python-3.12.4...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use ncurses from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 15.3 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/s3/gx0d1ysd07n3yfj0dss896l80000gn/T/python-build.20250203195555.56142
Results logged to /var/folders/s3/gx0d1ysd07n3yfj0dss896l80000gn/T/python-build.20250203195555.56142.log
Last 10 log lines:
__locale_localeconv in _localemodule.o
__locale_localeconv in _localemodule.o
__locale_localeconv in _localemodule.o
__locale_localeconv in _localemodule.o
"_libintl_textdomain", referenced from:
__locale_textdomain in _localemodule.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_freeze_module] Error 1
make: *** Waiting for unfinished jobs....
I'm running MacOS 15.3 on a MacbookPro M2. Pyenv (version 2.5.1) was installed with Homebrew
ld: symbol(s) not found for architecture arm64
seems to be the problem here.
I'm afraid to mess with my system. I'm not very knowledgable for now. Is there a place where I can find stp by step help for my problem please?
Thank you very much
Bernard
What I found here (https://github.com/pyenv/pyenv/issues/1348#issuecomment-514057168) and other locations seem not to help.
AR=/usr/bin/ar pyenv install 3.12.4
gives the same error.
Also adding this to my ./zhsrc did not help
export CC="clang"
export CXX="$(CC)++"
export LDFLAGS="-L/usr/local/opt/zlib/lib, -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include, -I/usr/local/opt/llvm/include/c++/v1/"
All dependencies seem installed. I also removed and reinstalled xcode
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
Also uninstalling pyenv with homebrew and getting it from github did not work