xcrun: errorの解決方法

新しいXcodeをインストール後に、Pythonで仮想環境を作ろうとしたら以下のエラーが発生した。

notsukunnoMacBook-Pro-10:enjoyJS nokkun$ python3 -m venv .venv
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

なぜPythonでXcode?と思った。

XcodeはインストールしてもApplicationフォルダに格納されずDownloadフォルダにアプリが作成される。

手動でDownloadからApplicationへ移動させたら解決した。

ABOUTこの記事をかいた人

個人アプリ開発者。Python、Swift、Unityのことを発信します。月間2.5万PVブログ運営。 Twitter:@yamagablog