何があった?
Unityで強化学習ができるML-Agentsを使って見ようと思い、ここを見ながら環境を構築していたら、こんなエラーが
The API number is not compatible between Unity and python. Python API: API-13, Unity API: 1.0.0.
Google翻訳
API番号はUnityとPythonの間で互換性がありません。 Python API:API-13、Unity API:1.0.0。
原因
どうやら調べてみると、
pip install ml-agents
でインストールできるml-agentsは古いらしく、ml-agentsの最新リポジトリからインストールする必要があるみたい
対処法
ml-agentsをダウンロードし、ターミナルでml-agents-masterまで移動し、以下のコマンドで最新リポジトリのml-agentsをインストールできます。
pip install -e ./ml-agents
pip install -e ./ml-agents-envs