Skip to content

Installing Unity ml agents on Windows

pz1004 edited this page Aug 17, 2018 · 3 revisions

Test environment

OS: Windows 10 / x86_64
python version: 3.6
pytorch : 0.4.0
cuda : 9.0
cudnn : 7.0.5 for cuda 9.0

Installation manual for Windows

1. Make and activate virtual environment via Anaconda

Download and install Anaconda

Make and activate virtual environment

  • Execute Anaconda Prompt
  • replace pg_travel with your favor name.
conda create -y -n pg_travel python=3.6
conda activate pg_travel

2. Clone Unity ml-agent repository and install it

git clone https://github.com/Unity-Technologies/ml-agents
cd ml-agents/python
pip install .

3. Install pytorch

3.1. Install pytorch for GPU users

Download and install cuda & cudnn

Download and install pytorch for gpu

pip install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp36-cp36m-win_amd64.whl 
pip install torchvision

3.2. Install pytorch for CPU users

pip install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-win_amd64.whl 
pip install torchvision

3.3 Install pytorch for other platforms

Refer installation manual for other platforms from the pytorch official homepage

4. Clone pg_travel repository and install the prerequisite

Note that the prerequisites other than tensorboardX are installed when installing Unity ml-agents

git clone https://github.com/reinforcement-learning-kr/pg_travel
pip install tensorboardX