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: site/en/install/pip.md
+52-3Lines changed: 52 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,25 @@ The following NVIDIA® software are only required for GPU support.
194
194
nvidia-smi
195
195
```
196
196
197
-
### 3. Install TensorFlow
197
+
### 3. Create a virtual environment with [venv](https://docs.python.org/3/library/venv.html){:.external}
198
+
199
+
The venv module is part of Python’s standard library and is the officially recommended way to create virtual environments.
200
+
201
+
Navigate to your desired virtual environments directory and create a new venv environment named `tf` with the following command.
202
+
203
+
```bash
204
+
python3 -m venv tf
205
+
```
206
+
207
+
You can activate it with the following command.
208
+
209
+
```bash
210
+
source tf/bin/activate
211
+
```
212
+
213
+
Make sure that the virtual environment is activated for the rest of the installation.
214
+
215
+
### 4. Install TensorFlow
198
216
199
217
TensorFlow requires a recent version of pip, so upgrade your pip
200
218
installation to be sure you're running the latest version.
@@ -212,7 +230,9 @@ The following NVIDIA® software are only required for GPU support.
212
230
pip install tensorflow
213
231
```
214
232
215
-
### 4. Verify the installation
233
+
**Note:** Do not install TensorFlow with `conda`. It may not have the latest stable version. `pip` is recommended since TensorFlow is only officially released to PyPI.
234
+
235
+
### 6. Verify the installation
216
236
217
237
Verify the CPU setup:
218
238
@@ -229,7 +249,36 @@ The following NVIDIA® software are only required for GPU support.
229
249
```
230
250
231
251
If a list of GPU devices is returned, you've installed TensorFlow
232
-
successfully.
252
+
successfully. **If not continue to the next step**.
0 commit comments