You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.ml-agents/Documentation~/Installation.md
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,37 +3,49 @@ To install and use the ML-Agents Toolkit, follow the steps below. Detailed instr
3
3
4
4
1. Install Unity (6000.0 or later)
5
5
2. Install Python using conda (>= 3.10.1, <=3.10.12) - we recommend using 3.10.12
6
-
3. Install the `com.unity.ml-agents` Unity package
7
-
4. Install `mlagents-envs`
8
-
5. Install `mlagents`
6
+
3. Install ML-Agents using one of the following methods:
9
7
10
-
### Install **Unity 6000.0** or Later
8
+
3.1 Package installation
9
+
10
+
3.2 Advanced installation
11
+
12
+
## 1. Install **Unity 6000.0** or Later
11
13
12
14
[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.
13
15
14
-
###Install **Python 3.10.12** using Conda
16
+
##2. Install **Python 3.10.12** using Conda
15
17
16
18
We recommend using [conda](https://docs.conda.io/en/latest/) or [mamba](https://github.com/mamba-org/mamba) to install and manage Python environments.
17
19
18
-
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:
20
+
Once conda has been installed on your system, open a terminal and execute the following commands to set up a Python 3.10.12 virtual environment and activate it:
### Install the `com.unity.ml-agents` Unity package
26
+
On Windows, you'll have to install the PyTorch package separately prior to installing ML-Agents in order to make sure the cuda-enabled version is used, rather than the CPU-only version. Activate your virtual environment and run from the command line:
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.
33
+
34
+
35
+
## 3.1 Install ML-Agents - Package Installation
36
+
Use this installation method if you do not plan to modify or extend the ML-Agents Toolkit for your purposes and you don't need access to our example environments.
37
+
38
+
### 3.1.1 Install the `com.unity.ml-agents` Unity package
25
39
26
40
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.
27
41
28
-
**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.
42
+
**NOTE:** If you do not see the ML-Agents package listed in the Package Manager please follow the [Advanced Installation](#32-install-ml-agents---advanced-installation) instructions at the bottom of this page.
29
43
30
-
### Install Python package
44
+
### 3.1.2 Install Python package
31
45
32
46
Installing the `mlagents` Python package involves installing other Python packages that `mlagents` depends on. So you may run into installation issues if your machine has older versions of any of those dependencies already installed. Consequently, our supported path for installing `mlagents` is to leverage Python Virtual Environments. Virtual Environments provide a mechanism for isolating the dependencies for each project and are supported on Mac / Windows / Linux. We offer a dedicated [guide on Virtual Environments](Using-Virtual-Environment.md).
33
47
34
-
#### Installing `mlagents` from PyPi
35
-
36
-
You can install the ML-Agents Python package directly from PyPi. This is the recommended approach if you installed the C# package via the Package Manager registry.
48
+
You can install the ML-Agents Python package directly from PyPi.
37
49
38
50
**Important:** Ensure you install a Python package version that matches your Unity package version. Check the [release history](https://github.com/Unity-Technologies/ml-agents/releases) to find compatible versions.
When you install the Python package, the dependencies listed in the [setup.py file](https://github.com/Unity-Technologies/ml-agents/blob/release/4.0.0/ml-agents/setup.py) are also installed. These include [PyTorch](Background-PyTorch.md).
53
65
54
66
55
-
## Advanced Installation
56
-
57
-
### Unity Package: Local Installation for Development
67
+
## 3.2 Install ML-Agents - Advanced Installation
58
68
59
69
You will need to clone the repository if you plan to modify or extend the ML-Agents Toolkit for your purposes, or if you'd like to download our example environments. Some of our tutorials / guides assume you have access to our example environments.
The `--branch release_23` option will switch to the tag of the latest stable release. Omitting that will get the `develop` branch which is potentially unstable. However, if you find that a release branch does not work, the recommendation is to use the `develop` branch as it may have potential fixes for bugs and dependency issues.
68
78
69
-
(Optional to get bleeding edge)
79
+
To get the bleeding-edge development version (optional):
If you plan to contribute those changes back, make sure to clone the `develop` branch (by omitting `--branch release_23` from the command above). See our [Contributions Guidelines](CONTRIBUTING.md) for more information on contributing to the ML-Agents Toolkit.
76
86
87
+
### 3.2.1 Add the `com.unity.ml-agents` Unity package
77
88
You can [add the local](https://docs.unity3d.com/Manual/upm-ui-local.html)`com.unity.ml-agents` package (from the repository that you just cloned) to your project by:
78
89
79
-
1.navigating to the menu `Window` -> `Package Manager`.
80
-
2. In the package manager window click on the `+` button on the top left of the packages list).
90
+
1.Navigating to the menu `Window` -> `Package Manager`.
91
+
2. In the package manager window, click on the `+` button on the top left of the packages list.
81
92
3. Select `Add package from disk...`
82
93
4. Navigate into the `com.unity.ml-agents` folder.
83
94
5. Select the `package.json` file.
@@ -86,19 +97,7 @@ You can [add the local](https://docs.unity3d.com/Manual/upm-ui-local.html) `com.
86
97
87
98
If you are going to follow the examples from our documentation, you can open the `Project` folder in Unity and start tinkering immediately.
88
99
89
-
### Python Package: Local Installation for Development
90
-
91
-
#### (Windows) Installing PyTorch
92
-
93
-
On Windows, you'll have to install the PyTorch package separately prior to installing ML-Agents in order to make sure the cuda-enabled version is used, rather than the CPU-only version. Activate your virtual environment and run from the command line:
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.
100
-
101
-
#### All Platforms
100
+
### 3.2.2 Install Python package
102
101
103
102
To install the `mlagents` Python package, activate your virtual environment and run from the command line:
0 commit comments