Skip to content

Conversation

@maryamziaa
Copy link
Contributor

Proposed change(s)

Improve the installation documentation for better clarity and ease of use.

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@maryamziaa maryamziaa changed the base branch from release/4.0.0 to develop August 28, 2025 15:07
@maryamziaa maryamziaa changed the base branch from develop to release/4.0.0 August 28, 2025 15:08
@maryamziaa maryamziaa changed the base branch from release/4.0.0 to develop September 2, 2025 22:03
Copy link
Collaborator

@manugaursharma manugaursharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added some initial suggestions. Please feel free to accept/reject as appropriate.

@@ -1,23 +1,21 @@
# Installation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Installation
# Install the ML-Agents Toolkit

@@ -1,23 +1,21 @@
# Installation
To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page.
To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page. For advanced installation and development setup, see the [Advanced Installation](#advanced-installation) section at the bottom of this page.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To install and use the ML-Agents Toolkit, follow the steps below. Detailed instructions for each step are provided later on this page. For advanced installation and development setup, see the [Advanced Installation](#advanced-installation) section at the bottom of this page.
Use this information to install and use the ML-Agents Toolkit.
For advanced setup and development options, refer to [Advanced Installation](#advanced-installation).

2. Install Python (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12
3. Install the `com.unity.ml-agents` Unity package; or clone this repository and install locally (recommended for the latest version and bug fixes)
2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12
3. Install the `com.unity.ml-agents` Unity package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Install the `com.unity.ml-agents` Unity package

3. Install the `com.unity.ml-agents` Unity package; or clone this repository and install locally (recommended for the latest version and bug fixes)
2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12
3. Install the `com.unity.ml-agents` Unity package
4. Install `mlagents-envs`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Install `mlagents-envs`

2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12
3. Install the `com.unity.ml-agents` Unity package
4. Install `mlagents-envs`
5. Install `mlagents`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Install `mlagents`

[Download](https://unity3d.com/get-unity/download) and install Unity. We strongly recommend that you install Unity through the Unity Hub as it will enable you to manage multiple Unity versions.

### Install **Python 3.10.12**
### Install **Python 3.10.12** using Conda
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Install **Python 3.10.12** using Conda
## Install Python 3.10.12 using Conda

#### Conda python setup

Once conda has been installed in your system, open a terminal and execute the following commands to setup a python 3.10.12 virtual environment and activate it.
Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed above, so this can be removed.

#### Conda python setup

Once conda has been installed in your system, open a terminal and execute the following commands to setup a python 3.10.12 virtual environment and activate it.
Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Once conda has been installed on your system, open a terminal and execute the following commands to setup a Python 3.10.12 virtual environment and activate it:

The Unity ML-Agents C# SDK is a Unity Package. You can install the `com.unity.ml-agents` package [directly from the Package Manager registry](https://docs.unity3d.com/Manual/upm-ui-install.html). Please make sure you enable 'Preview Packages' in the 'Advanced' dropdown in order to find the latest Preview release of the package.

**NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the advanced installation instructions below.
**NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the [Advanced Installation](#advanced-installation) instructions at the bottom of this page.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the [Advanced Installation](#advanced-installation) instructions at the bottom of this page.
**NOTE:** If you don't see the ML-Agents package listed in the **Package Manager**, refer to [Advanced Installation](#advanced-installation).

## Advanced Installation

#### Advanced: Local Installation for Development
### Unity Package: Local Installation for Development
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Unity Package: Local Installation for Development
### Unity Package: Local installation for development

Copy link
Collaborator

@manugaursharma manugaursharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some suggestions to reorganise the content of this page. Please accept/reject them as appropriate.

1. Navigating to the menu `Window` -> `Package Manager`.
2. In the package manager window, click on the `+` button on the top left of the packages list.
3. Select `Add package from disk...`
4. Navigate into the `com.unity.ml-agents` folder.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Navigate into the `com.unity.ml-agents` folder.

2. In the package manager window, click on the `+` button on the top left of the packages list.
3. Select `Add package from disk...`
4. Navigate into the `com.unity.ml-agents` folder.
5. Select the `package.json` file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Select the `package.json` file.


<p align="center"> <img src="images/unity_package_manager_window.png" alt="Unity Package Manager Window" height="150" border="10" /> <img src="images/unity_package_json.png" alt="package.json" height="150" border="10" /> </p>

If you are going to follow the examples from our documentation, you can open the `Project` folder in Unity and start tinkering immediately.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are going to follow the examples from our documentation, you can open the `Project` folder in Unity and start tinkering immediately.

Note that on Windows, you may also need Microsoft's Visual C++ Redistributable if you don't have it already. See the [PyTorch installation guide](https://pytorch.org/get-started/locally/) for more installation options and versions.

#### All Platforms
### 3.2.2 Install Python package
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### 3.2.2 Install Python package
#### Install the ML-Agents Python package
Install the Python packages from the cloned repository to enable training and environment communication.
1. From the root of the cloned repository, activate your virtual environment and run:

cd /path/to/ml-agents
python -m pip install ./ml-agents-envs
python -m pip install ./ml-agents


This installs the ML-Agents packages directly from the cloned source, not from PyPI.

2. To confirm a successful installation, run:

mlagents-learn --help


If the command lists available parameters, your setup is complete.

3. If you plan to modify the ML-Agents source code or contribute changes, install the packages in editable mode.

Editable installs let you make live changes to the Python files and test them immediately.

From the repository’s root directory, run:

pip3 install torch -f https://download.pytorch.org/whl/torch_stable.html
pip3 install -e ./ml-agents-envs
pip3 install -e ./ml-agents


> [!NOTE]  
> Install the packages in this order. The `mlagents` package depends on `mlagents_envs`. Installing them in the reverse order causes `mlagents_envs` to be downloaded from PyPI, which can cause version mismatches.

#### All Platforms
### 3.2.2 Install Python package

To install the `mlagents` Python package, activate your virtual environment and run from the command line:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may please delete all the following information as it has been covered in the steps above.

Co-authored-by: manugaursharma <131156606+manugaursharma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants