Skip to content

Commit e3d5444

Browse files
authored
Update env.md
1 parent 87f5a9f commit e3d5444

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

bash/env.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ avoidance, ease of collaboration, and peace of mind from working in an unclutter
4444
4545

4646
Installing packages (libraries) within an environment can be done on an as-needed basis; but reproducibility comes by
47-
means of grocery list files that consist primarily of a list of libraries. The two common varieties are
48-
`environment.yml` and `requirements.txt` files. These
47+
means of grocery list files (called *environment files*) that consist primarily of a list of libraries.
48+
Two common varieties are `environment.yml` and `requirements.txt` files. These
4949
correspond respectively to `conda` and `pip`. Mnemonic: `p` is close to `q` and `c` is close to `e`. The idea is to
50-
feed the package manager one of these package list files and let it solve the compatibilities and install compatible
50+
feed the package manager one of these environment files and let it solve for compatibilities and install corresponding
5151
versions of the various packages.
5252

5353

@@ -58,6 +58,14 @@ together with `venv` (environment management). Both `pip` and `conda` can be use
5858
individually or *en masse* by means of grocery list files.
5959

6060

61+
Some best practices
62+
- Avoid mixing `conda install` and `pip install` in a given environment
63+
- One environment per project
64+
- Keep environments small
65+
- Verify reproducibility by sharing environment files
66+
67+
68+
6169
Example: Suppose I have three projects in mind: Learning some number theory, developing a curriculum for beginning programmers,
6270
and analyzing oceanographic data.
6371

0 commit comments

Comments
 (0)