While trying to install Python 3.6.6
(for Airflow
) using PyEnv
on MacOS
, I am encountering build failure
This worked for me:
In my case this was caused by migration of data from old to new Mac. Both Xcode Command Line Tools and Homebrew migrated, but something broke. Reinstalling them from scratch worked for me.
Reinstall CLI tools:
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
Reinstall and update Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
Istall pyenv + packages and python 3:
brew install pyenv
brew install openssl readline sqlite3 xz zlib
pyenv install 3.7.5