Unity: Fix the damn instructions!

You just need one person to actually follow the instructions to figure out that it all simply doesn’t work with python 3.10.12. Can you maybe update the instructions to something that actually works? Thanks.

mlagents
goto downloads
git clone --branch release_21 GitHub - Unity-Technologies/ml-agents: The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
cd .\ml-agents
python -m venv venv (py -3.9 -m venv venv) (get python v3.9.13)
venv/scripts/activate
python -m pip install --upgrade pip
pip install mlagents
pip3 install torch torchvision torchaudio
pip install protobuf==3.20.3
pip install onnx
mlagents-learn config/ppo/3dball.yaml --run-id PoSquarePushCl1 --force
tensorboard --logdir results

New project in Unity
Packages / Unity Registry / ml… / 2.0.1 install

1 Like

When I follow the official instructions the command

python -m pip install ./ml-agents-env

downloads numpy 1.21.2:
Preparing metadata (setup.py) … done
Collecting numpy==1.21.2 (from mlagents_envs==1.0.0)
Downloading numpy-1.21.2.zip (10.3 MB)

and tries to build a whl for numpy 1.21.2 which fails :

Building wheel for numpy (pyproject.toml) … error
error: subprocess-exited-with-error
× Building wheel for numpy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [287 lines of output]
setup.py:63: RuntimeWarning: NumPy 1.21.2 may not yet support Python 3.10.

so has unity neglegted to update the mlagents_envs numpy identifier?
Is there anyway around this?
The above answer seems to not be using the 3.0 package .

EDIT: got past the numpy error, solution was editing the setup.py files , found help in a closed issue on the github. release-21-branch numpy can't install successful. · Issue #6047 · Unity-Technologies/ml-agents · GitHub