Skip to content

Commit fc2f79c

Browse files
Updated installation instructions. (#5988)
1 parent 7b55335 commit fc2f79c

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

docs/Installation.md

+29-7
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ Consequently, to install and use the ML-Agents Toolkit you will need to:
2626

2727
- Install Unity (2022.3 or later)
2828
- Install Python (3.10.12 or higher)
29-
- Clone this repository (Optional)
29+
- Clone this repository (Recommended for the latest version and bug fixes)
3030
- __Note:__ If you do not clone the repository, then you will not be
3131
able to access the example environments and training configurations or the
3232
`com.unity.ml-agents.extensions` package. Additionally, the
3333
[Getting Started Guide](Getting-Started.md) assumes that you have cloned the
3434
repository.
3535
- Install the `com.unity.ml-agents` Unity package
3636
- Install the `com.unity.ml-agents.extensions` Unity package (Optional)
37+
- Install the `mlagents-envs`
3738
- Install the `mlagents` Python package
3839

3940
### Install **Unity 2022.3** or Later
@@ -44,13 +45,22 @@ enable you to manage multiple Unity versions.
4445

4546
### Install **Python 3.10.12** or Higher
4647

47-
We recommend [installing](https://www.python.org/downloads/) Python 3.7.
48+
We recommend [installing](https://www.python.org/downloads/) Python 3.10.
4849
If you are using Windows, please install the x86-64 version and not x86.
4950
If your Python environment doesn't include `pip3`, see these
5051
[instructions](https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers)
51-
on installing it.
52+
on installing it. We also recommend using [conda](https://docs.conda.io/en/latest/) or [mamba](https://github.com/mamba-org/mamba) to manage your python virtual environments.
5253

53-
### Clone the ML-Agents Toolkit Repository (Optional)
54+
#### Conda python setup
55+
56+
Once conda has been installed in your system, open a terminal and execute the following commands to setup a python 3.10 virtual environment
57+
and activate it.
58+
59+
```shell
60+
conda create -n mlagents python=3.10 && conda activate mlagents
61+
```
62+
63+
### Clone the ML-Agents Toolkit Repository (Recommended)
5464

5565
Now that you have installed Unity and Python, you can now install the Unity and
5666
Python packages. You do not need to clone the repository to install those
@@ -153,17 +163,29 @@ To install the `mlagents` Python package, activate your virtual environment and
153163
run from the command line:
154164

155165
```sh
156-
python -m pip install mlagents==0.30.0
166+
cd /path/to/ml-agents
167+
python -m pip install ./ml-agents-envs
168+
python -m pip install ./ml-agents
157169
```
158170

159-
Note that this will install `mlagents` from PyPi, _not_ from the cloned
171+
Note that this will install `mlagents` from the cloned repository, _not_ from the PyPi
160172
repository. If you installed this correctly, you should be able to run
161173
`mlagents-learn --help`, after which you will see the command
162174
line parameters you can use with `mlagents-learn`.
163175

176+
**NOTE:** Since ML-Agents development has slowed, PyPi releases will be less frequent. However, you can install from PyPi by executing
177+
the following command:
178+
179+
```shell
180+
python -m pip install mlagents
181+
```
182+
183+
which will install the latest version of ML-Agents and associated dependencies available on PyPi. Note, you need to have the matching version of
184+
the Unity packages with the particular release of the python packages. You can find the release history [here](https://github.com/Unity-Technologies/ml-agents/releases)
185+
164186
By installing the `mlagents` package, the dependencies listed in the
165187
[setup.py file](../ml-agents/setup.py) are also installed. These include
166-
[PyTorch](Background-PyTorch.md) (Requires a CPU w/ AVX support).
188+
[PyTorch](Background-PyTorch.md).
167189

168190
#### Advanced: Local Installation for Development
169191

0 commit comments

Comments
 (0)