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
+5-82Lines changed: 5 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,38 +193,9 @@ The following NVIDIA® software are only required for GPU support.
193
193
nvidia-smi
194
194
```
195
195
196
-
### 3. Install Miniconda
197
-
198
-
You can skip this section if you have already installed `Miniconda` (referred as *option #1* in the next steps) or you prefer to use Python’s built-in `venv` module (referred as *option #2* in the next steps) instead.
Create a new conda environment named `tf` with the following command.
214
-
215
-
```bash
216
-
conda create --name tf python=3.11
217
-
```
218
-
You can activate and deactivate it with the following commands.
219
-
220
-
```bash
221
-
conda activate tf
222
-
conda deactivate
223
-
```
224
-
225
-
****Option #2: venv***
196
+
### 3. Create a virtual environment with [venv](https://docs.python.org/3/library/venv.html){:.external}
226
197
227
-
The [venv](https://docs.python.org/3/library/venv.html){:.external} module supports creating lightweight “virtual environments”, each with their own independent set of Python packages installed in their site directories.
198
+
The venv module is part of Python’s standard library and is the officially recommended way to create virtual environments.
228
199
229
200
Navigate to your desired virtual environments directory and create a new venv environment named `tf` with the following command.
230
201
@@ -241,7 +212,7 @@ The following NVIDIA® software are only required for GPU support.
241
212
242
213
Make sure that the virtual environment is activated for the rest of the installation.
243
214
244
-
### 5. Install TensorFlow
215
+
### 4. Install TensorFlow
245
216
246
217
TensorFlow requires a recent version of pip, so upgrade your pip
247
218
installation to be sure you're running the latest version.
@@ -261,58 +232,10 @@ The following NVIDIA® software are only required for GPU support.
261
232
262
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.
263
234
264
-
### 6. Set environment variables
235
+
### 5. Set environment variables
265
236
266
237
You can skip this section if you only run TensorFlow on the CPU.
267
238
268
-
* ***Option #1: Miniconda***
269
-
270
-
Locate the directory for the conda environment in your terminal window by running in the terminal:
271
-
`echo $CONDA_PREFIX`
272
-
273
-
Enter that directory and create these subdirectories and files:
274
-
275
-
```bash
276
-
cd $CONDA_PREFIX
277
-
mkdir -p ./etc/conda/activate.d
278
-
mkdir -p ./etc/conda/deactivate.d
279
-
touch ./etc/conda/activate.d/env_vars.sh
280
-
touch ./etc/conda/deactivate.d/env_vars.sh
281
-
```
282
-
Edit `./etc/conda/activate.d/env_vars.sh` as follows:
0 commit comments