PyEnv BUILD FAILED installing Python on MacOS

后端 未结 8 2012
无人及你
无人及你 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:46

    This worked for me:

    1. remove CommandLineTools folder under /Library/Developer
    2. run in terminal: xcode-select --install
    3. sudo mv /usr/local/include /usr/local/include_old
    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题