API Number not compatible with Python

Hello.
I know this is an old question, but I’ve checked the ML-Agents update log and tried to force-update by pip and I am sure my MLA is up-to-date until yesterday. It didn’t work.
Is there a way, say downgrade my Unity API, so that it can work?

Here is my error info:
INFO:mlagents_envs:Environment shut down with return code 0 (CTRL_C_EVENT).
Traceback (most recent call last):
File “C:/Users/User/PycharmProjects/UnityMLA/unity.py”, line 5, in
env = UnityEnv(“C:/Users/User/Desktop/Police-Unity.exe”,worker_id=0)
File “C:\ProgramData\Anaconda3\envs\UnityMLA\lib\site-packages\gym_unity\envs_init_.py”, line 61, in init
environment_filename, worker_id, no_graphics=no_graphics
File “C:\ProgramData\Anaconda3\envs\UnityMLA\lib\site-packages\mlagents_envs\environment.py”, line 135, in init
f"The API number is not compatible between Unity and python. "
mlagents_envs.exception.UnityEnvironmentException: The API number is not compatible between Unity and python. Python API: API-13, Unity API: API-14-dev0.
Please go to https://github.com/Unity-Technologies/ml-agents/releases/tag/latest_releaseto download the latest version of ML-Agents.

Hi,
“API-14-dev0” means that you were running from the master branch, which might not be compatible with the previous release. You should get the version of the C# code from GitHub - Unity-Technologies/ml-agents at 0.13.1 and follow the installation documentation from there (not from the master branch).

1 Like

Sorry for the late reply, thank you it is solved.