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-24Lines changed: 30 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,7 @@ project by:
94
94
If you are going to follow the examples from our documentation, you can open the
95
95
`Project` folder in Unity and start tinkering immediately.
96
96
97
-
### Install `mlagents-envs` and `mlagents`
97
+
### Install Python package
98
98
99
99
Installing the `mlagents` Python package involves installing other Python
100
100
packages that `mlagents` depends on. So you may run into installation issues if
@@ -104,7 +104,33 @@ Virtual Environments. Virtual Environments provide a mechanism for isolating the
104
104
dependencies for each project and are supported on Mac / Windows / Linux. We
105
105
offer a dedicated [guide on Virtual Environments](Using-Virtual-Environment.md).
106
106
107
-
#### (Windows) Installing PyTorch
107
+
#### Installing `mlagents` from PyPi
108
+
109
+
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.
110
+
111
+
**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.
112
+
113
+
To install, activate your virtual environment and run the following command:
114
+
115
+
```shell
116
+
python -m pip install mlagents==1.1.0
117
+
```
118
+
119
+
which will install the latest version of ML-Agents Python packages and associated dependencies available on PyPi.
120
+
If building the wheel for `grpcio` fails, run the following command before installing `mlagents` with pip:
121
+
122
+
```shell
123
+
conda install "grpcio=1.48.2" -c conda-forge
124
+
```
125
+
126
+
When you install the Python package, the dependencies listed in the
127
+
[setup.py file](https://github.com/Unity-Technologies/ml-agents/blob/release_22/ml-agents/setup.py) are also installed. These include
128
+
[PyTorch](Background-PyTorch.md).
129
+
130
+
131
+
#### Advanced: Local Installation for Development
132
+
133
+
##### (Windows) Installing PyTorch
108
134
109
135
On Windows, you'll have to install the PyTorch package separately prior to
110
136
installing ML-Agents in order to make sure the cuda-enabled version is used,
@@ -119,7 +145,7 @@ Note that on Windows, you may also need Microsoft's
119
145
Visual C++ Redistributable if you don't have it already. See the [PyTorch installation guide](https://pytorch.org/get-started/locally/)
120
146
for more installation options and versions.
121
147
122
-
####Installing `mlagents`
148
+
##### All Platforms
123
149
124
150
To install the `mlagents` Python package, activate your virtual environment and
125
151
run from the command line:
@@ -135,29 +161,9 @@ repository. If you installed this correctly, you should be able to run
135
161
`mlagents-learn --help`, after which you will see the command
136
162
line parameters you can use with `mlagents-learn`.
137
163
138
-
You can also install the python package from PyPi by executing the following command:
139
-
140
-
```shell
141
-
python -m pip install mlagents==1.1.0
142
-
```
143
-
144
-
which will install the latest version of ML-Agents and associated dependencies available on PyPi.
145
-
If building the wheel for `grpcio` fails, run the following command before installing `mlagents` with pip:
146
-
147
-
```shell
148
-
conda install "grpcio=1.48.2" -c conda-forge
149
-
```
150
-
151
-
Note, you need to have the matching version of
152
-
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)
153
164
154
-
When you install the `mlagents` package, the dependencies listed in the
155
-
[setup.py file](https://github.com/Unity-Technologies/ml-agents/blob/release_22/ml-agents/setup.py) are also installed. These include
156
-
[PyTorch](Background-PyTorch.md).
157
165
158
-
If you intend to make modifications to `mlagents` or `mlagents_envs`, you should
159
-
install the packages from the cloned repository rather than from PyPi. To do
160
-
this, you will need to install `mlagents` and `mlagents_envs` separately. From
166
+
If you intend to make modifications to `mlagents` or `mlagents_envs`, from
0 commit comments