unity mlagents on mac m1


use python 3.8 venv

pip3 install torch==1.8.1 -f

brew install hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.1/
pip install --no-binary=h5py h5py

pip install mlagents==0.27.0

pip install unityagents

New project

Window Package Manager

Add package from git URL


Useful Links


A tutorial to setup ml agents in Unity

Build and environment

ML agents API

Ml agents GitHub repository

Deep Reinforcement Learning Course

Example Solution Banana Agent (Food Collector)

Blender for AI developers

Useful Tools

If you have a space mouse, you can use this driver in unity

How to use VSCode for Unity