Skip to content

Commit a28d5af

Browse files
authored
Merge pull request #91 from UoMResearchIT/85-conda-env-export-is-outdated
Update instructions to use conda export rather than conda env export
2 parents b8ee84b + e07c98d commit a28d5af

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

episodes/04-software_package_management.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ This contains similar information to the standard `conda list` command, but in a
395395
A better method is to use:
396396

397397
```bash
398-
conda env export
398+
conda export
399399
```
400400

401401
```output
@@ -421,12 +421,13 @@ dependencies:
421421
prefix: /home/mbessdl2/.conda/envs/myenv
422422
```
423423

424-
This will present the same information, but in the more readable [YAML](https://yaml.org/) format, and it will also include the channel information in the output. This information can be saved as a text file as before, and used to create a new environment using the command `conda env create`. However it is still operating system specific information.
424+
This will present the same information, but in the more readable [YAML](https://yaml.org/) format, and it will also include the channel information in the output. This information can be saved as a txt or yml file as before e.g. `conda export > envfile.yml`, and used to create a new environment using the command `conda env create` (see below). However it is still using operating system specific information.
425425

426426
To create a higher-level record of the environment you can use:
427427

428428
```bash
429-
conda env export --from-history
429+
conda export --from-history > envfile.yml
430+
more envfile.yml
430431
```
431432

432433
```output
@@ -464,7 +465,7 @@ The name that you give the environment does not have to be the same as the name
464465
- `conda install -n <env> <pacakge(s)>` installs packages in a pre-existing environment
465466
- `conda activate <env>` activates the named environment, giving access to the software installed there
466467
- `conda deactivate` deactivates the current environment
467-
- `conda env export --from-history > <file.yml>` creates a portable record of your current environment
468+
- `conda export --from-history > <file.yml>` creates a portable record of your current environment
468469
- `conda env create --file <file.yml> <env>` creates a new environment from an environment file
469470

470471
::::::::::::::::::::::::::::::::::::::::::::::::::

0 commit comments

Comments
 (0)