@@ -29,6 +29,7 @@ One of the easiest ways to mess up a conda installation is to install a bunch of
2929## Install * micromamba*
3030
3131### Run the installer
32+
3233Install ` micromamba ` , the executable we will use to manage our virtual environments.
3334
3435=== "MacOS/Linux"
@@ -39,19 +40,19 @@ Install `micromamba`, the executable we will use to manage our virtual environme
3940 ```console
4041 $ "${SHELL}" <(curl -L micro.mamba.pm/install.sh)
4142 ---> 100%
42-
43+
4344 // You will be asked whether you want to initialise your shell.
4445 // Respond "Y".
45-
46+
4647 Init shell? [Y/n] Y
47-
48+
4849 // You will be asked where you want to install micromamba.
4950 // Using the default is recommended.
50-
51+
5152 Prefix location? [~/micromamba]
52-
53+
5354 // You will need to restart your shell for changes to take effect.
54-
55+
5556 Please restart your shell to activate micromamba.
5657 ```
5758
@@ -60,26 +61,26 @@ Install `micromamba`, the executable we will use to manage our virtual environme
6061 Next, setup `micromamba` to download packages from
6162 [*conda-forge*](https://conda-forge.org/)
6263 a community driven package repository.
63-
64+
6465 <div class="termy">
65-
66+
6667 ```console
6768 $ micromamba config append channels conda-forge
6869 $ micromamba config append channels nodefaults
6970 $ micromamba config set channel_priority strict
7071 ```
71-
72+
7273 </div>
7374
7475=== "Windows"
7576
7677 todo: add windows guide
77-
78- ### Set up an alias
78+
79+ ### Set up an alias
7980
8081!!!tip "set up an alias for micromamba"
8182 ` micromamba ` replaces ` conda ` . Set up an alias if you want to type ` conda ` at the prompt.
82-
83+
8384=== "bash"
8485
8586 ```bash title="~/.bashrc"
@@ -91,9 +92,9 @@ Install `micromamba`, the executable we will use to manage our virtual environme
9192 ```zsh title="~/.zshrc"
9293 alias conda="micromamba"
9394 ```
94-
95+
9596=== "PowerShell"
96-
97+
9798 ```PowerShell title="$Home\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
9899 Set-Alias conda mamba
99100 ```
@@ -107,45 +108,42 @@ We will use `conda` at the prompt rather than `micromamba` for the rest of this
107108Run the following to create and activate an environment called ` my-env ` with Python 3.10
108109
109110<div class =" termy " >
110-
111+
111112 ```console
112113 $ conda create --name my-env python=3.10
113-
114+
114115 // To work in the environment we first need to activate it.
115-
116+
116117 $ conda activate my-env
117-
118+
118119 // Your prompt will indicate your current environment.
119-
120- $ (my-env) ➜
121-
120+
121+ $ (my-env) ➜
122+
122123 // Let's check that we have the correct Python version.
123-
124+
124125 $ (my-env) ➜ python --version
125126 Python 3.10.10
126-
127+
127128 ```
128129
129130</div >
130131
131-
132-
133132### Installing packages
134133
135134You can install most packages into your environment with ` conda ` or ` pip ` .
136- Install what you can with ` conda ` . If a package is available on
135+ Install what you can with ` conda ` . If a package is available on
137136[ PyPI] ( https://pypi.org/ ) but not [ conda-forge] ( https://conda-forge.org/ ) then use ` pip ` .
138137
139138=== "conda"
140139
141140 <div class="termy">
142-
141+
143142 ```console
144143 $ (my-env) ➜ conda install numpy
145144 ```
146145
147146 </div>
148-
149147
150148=== "pip"
151149
@@ -165,9 +163,9 @@ We can deactivate an environment with
165163
166164 ```console
167165 $ (my-env) ➜ conda deactivate
168-
166+
169167 // You are no longer in my-env.
170-
168+
171169 $
172170 ```
173171
@@ -209,7 +207,7 @@ This is useful for workflows which rely on software with incompatible dependenci
209207!!!tip "Get comfy! 🧸"
210208 Getting comfortable with the creation, destruction, activation and deactivation of environments at will is liberating.
211209 Practice now!
212-
210+
213211!!!tip "One environment per project 🌍"
214212 Working with one environment per project is a useful ideal.
215213 A general purpose environment can be useful for quick scripts and analysis.
0 commit comments