To install the ML-Agents Toolkit on macOS or Linux, you need first to install Python 3.6 (at the moment, the ML-Agents Toolkit works only with Python 3.6).
Then, just go in the ml-agents subfolder and run the following command:
pip3 install .
If everything is correct, you should be able to run the mlagents-learn --help command without any errors.