1

I am running into BUILD FAILED Error (OS X 15.1 using python-build 2.5.1) when attempting to install python via pyenv install 3.12.8

bash-3.2$ pyenv install 3.12.8
python-build: use openssl@3 from homebrew
python-build: use readline from homebrew
Downloading Python-3.12.8.tar.xz...
-> https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz
Installing Python-3.12.8...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk

BUILD FAILED (OS X 15.1 using python-build 2.5.1)

Inspect or clean up the working tree at /var/folders/d0/gnksqzwn2fn46fjgrkp6045c0000gn/T/python-build.20250126085216.9551
Results logged to /var/folders/d0/gnksqzwn2fn46fjgrkp6045c0000gn/T/python-build.20250126085216.9551.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 re-installed xcode and set environment variables as suggested in other posts, but that didn't work.

PyEnv BUILD FAILED installing Python on MacOS

1
  • I've run into this same issue and have been able to get around it with Rosetta; however, that isn't ideal from a performance perspective. Were you able to get this resolved? Commented Feb 3 at 4:33

2 Answers 2

1

I had this issue. It seems I had the x86_64 Homebrew version installed and my Macbook was using it by default, resulting in this error.

Here's how I fixed it:

  1. Uninstall x86_64 Homebrew, arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
  2. Download and install Homebrew pkg from https://github.com/Homebrew/brew/releases/tag/4.4.20 (as recommended on the Homebrew website)
  3. Make sure brew is in your path echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
  4. Run brew pyenv install
  5. Run pyenv install <whatever_version_you_want>

This issue thread was helpful: https://github.com/orgs/pyenv/discussions/2880

0

Your pyenv might not be up to date. Try upgrading pyenv by running:

pyenv update

Once updated, try installing Python again:

pyenv install 3.12.8

Let me know if this resolves the issue!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.