LoginSignup
1
1

More than 5 years have passed since last update.

MacOSをMojaveにアップデートしたらpip installでxcrun error

Posted at

備忘録。
タイトルどおり、osアップデートしたら、pip installで以下のようなエラーが発生

,,,省略,,,
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'gcc' failed with exit status 1

なぜかはよくわからないが、コマンドラインツールへのパスが無効になってるので、Mojaveに対してもう一度xcode-selectをインストールする。
やっとかないと、pipだけじゃなくてgitとかbrewとかいろんなコマンドで同じようなエラー吐きそう。

ターミナルで

xcode-select --install

でインストール確認ポップアップが表示されるので、OKを選択。
完了後もういちどpip installすると今度は成功しました。

もしかしてOSメジャーアップデートするたびに必要?

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1