PyEnv BUILD FAILED installing Python on MacOS

后端 未结 8 2010
无人及你
无人及你 2020-12-23 11:57

While trying to install Python 3.6.6 (for Airflow) using PyEnv on MacOS, I am encountering build failure

8条回答
  •  醉梦人生
    2020-12-23 12:48

    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
    

提交回复
热议问题