Installing the mlagents Python package involves installing other Python
packages that mlagents depends on. So you may run into installation issues if
your machine has older versions of any of those dependencies already installed.
Consequently, our supported path for installing mlagents is to leverage Python
Virtual Environments. Virtual Environments provide a mechanism for isolating the
dependencies for each project and are supported on Mac / Windows / Linux.
On Windows, you'll have to install the PyTorch package separately prior to installing ML-Agents. Activate your virtual environment and run from the command line:
pip3 install torch~=1.7.1 -f https://download.pytorch.org/whl/torch_stable.htmlNote that on Windows, you may also need Microsoft's Visual C++ Redistributable if you don't have it already. See the PyTorch installation guide for more installation options and versions.
To install the mlagents Python package, activate your virtual environment and
run from the command line:
python -m pip install mlagents==0.27.0Note that this will install mlagents from PyPi, not from the cloned
repository. If you installed this correctly, you should be able to run
mlagents-learn --help, after which you will see the command
line parameters you can use with mlagents-learn.