- xcodeインストール時に指定されるパス
/Applications/Xcode.app/Contents/Developer
- コマンドラインから手動でxcode-selectをインストールしたときのパス
/Library/Developer/CommandLineTools
- 切り替え
- sudo xcode-select -switch [切り替えるパス]
Command Line Toolsを切り替える方法 | Sutepulu
- アンインストールのコマンドはないらしいので手動で削除
sudo rm -r /Library/Developer/CommandLineTools
- インストール
xcode-select --install
pyenv
からインストール時にbinutils
が環境下にあると出るエラーbrew uninstall binutils
macOS で pyenv から python を導入する際 binutils が入ってるとコケる – ゴミ箱
Failed install on MacOS Mojave · Issue #1236 · pyenv/pyenv
- macに
zlib
が入っていなかったため、インストールbrew install zlib
- しかし、同じエラーが発生
- どうやら、xcode-selectの最新版(2354)にMojave用のmacOS SDK headerがデフォルトで入っていないのが原因
$ xcode-select -v xcode-select version 2354. # 手動でインストール $ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
- これで
pyenv
からpythonのバージョンアップができるようになった