Building an environment to run ML-Agent with Python
Python 3.7.6 mlagents 0.17.0 ML-Agents Release3 Unity 2019.2.21f1 Pyenv Poetry
Download Unity Hub
(1) Install Unity ML-Agents Release 3 from the following site https://github.com/Unity-Technologies/ml-agents
(2) Add the copied URL to the end of the Git clone command and execute it. You can download a set of files. (* Create a directory to work with before git clone!)
terminal
mkdir [Arbitrary directory name]
cd [Directory name]
git clone [Copyed URL]
(3) Make sure that the ml-agents directory is created and contains the following files!
(1) Install pyenv!
terminal
brew install pyenv
(2) Installation of Python 3.7.6
terminal
pyenv install 3.7.6
(3) This directory is set to run on Python 3.7.6
terminal
pyenv local 3.7.6
(4) Download and install the Python management package Poetry
terminal
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
(5) Poetry virtual environment preparation Check settings Set so that a virtual environment is created in the project, and check the setting status again
terminal
poetry config virtualenvs.in-project true
(6) Building a virtual environment with Python 3.7.6
(7) Install mlagent == 0.17.0!
terminal
poetry add mlagents==0.17.0
(7) Confirm that the mlagents-learn command can be executed. After executing the command below, confirm that something like the image below appears
terminal
mlagents-learn
Recommended Posts