2
2
3
3
# Anaconda and conda
4
4
5
- One attribute of Python that makes it a great language for science
5
+ One feature of Python that makes it a great language for science
6
6
is its abundance of packages (numpy! scipy! pandas! xarray! pymt!).
7
7
Package management can be difficult, though,
8
8
especially when a typical Python installation contains dozens of packages.
9
9
10
10
This is where the ` conda ` * package manager* is handy,
11
11
and a primary reason why CSDMS uses (and we recommend)
12
- the Anaconda Python distribution
13
- (now called [ Anaconda Individual Edition] ( https://www.anaconda.com/products/individual ) ).
12
+ the [ Anaconda Distribution] ( https://www.anaconda.com/products/distribution ) .
14
13
15
14
With ` conda ` , you can:
16
15
17
- * list
18
16
* install
17
+ * list
19
18
* update
20
19
* remove
21
20
@@ -45,11 +44,15 @@ change to this directory and view the file **environment.yaml** with `cat`:
45
44
```
46
45
$ cd ~/Desktop/ivy-main
47
46
$ cat environment.yaml
48
- # A conda environment for CSDMS Ivy lessons.
47
+ # A conda environment file for the CSDMS Ivy lessons.
48
+ #
49
+ # This file is used to create the `ivy` environment on Linux, macOS, and
50
+ # Windows. See "environment.unix.yaml" for additional packages that aren't
51
+ # available on Windows.
49
52
#
50
53
# Usage:
51
- # $ conda env create --file= environment.yaml
52
- # $ source activate ivy
54
+ # $ conda env create --file environment.yaml
55
+ # $ conda activate ivy
53
56
54
57
name: ivy
55
58
channels:
@@ -65,25 +68,25 @@ dependencies:
65
68
- pytest
66
69
- coverage
67
70
- bmipy
68
- - pymt >=1.1
69
- - landlab >=2.0
71
+ # - bmi-example-python
72
+ - pymt >=1.3
73
+ - landlab >=2.5
70
74
- terrainbento
71
75
- pymt_child
72
76
- pymt_hydrotrend
73
- - pymt_sedflux
74
77
- bmi-topography
75
78
- imageio
76
79
- tqdm
77
80
```
78
81
79
- The environment file lists all the packages needed to run the course material.
82
+ The environment file lists the packages needed to run the course material.
80
83
If a package has a dependency not explicitly listed
81
84
(e.g., ` pymt ` is built on ` xarray ` ),
82
85
` conda ` finds a compatible package version for you.
83
86
84
87
To create the environment, type:
85
88
```
86
- $ conda env create --file= environment.yaml
89
+ $ conda env create --file environment.yaml
87
90
```
88
91
89
92
Once the environment has been created, type
@@ -94,6 +97,15 @@ to make this environment current.
94
97
(Note on Linux and macOS,
95
98
you may have to use ` source ` instead of ` conda ` to activate the environment.)
96
99
100
+ Some packages used in Ivy aren't built for Windows.
101
+ These packages have been listed in a second environment file,
102
+ ** environment.unix.yaml** .
103
+ To update the ` ivy ` environment on Linux or macOS
104
+ with these packages, type:
105
+ ```
106
+ $ conda env update --name ivy --file environment.unix.yaml --prune
107
+ ```
108
+
97
109
Later,
98
110
when finished using the environment, type
99
111
```
0 commit comments