Skip to content

Commit f801bbb

Browse files
committed
add links to docs for each tool
1 parent e6dc8c9 commit f801bbb

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

content/how-tos/how-to-create-environments.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: How to set up a virtual environment
2+
title: How to set up an environment
33
---
44

5-
In this guide we summarize some key commands to set up a virtual environment
6-
with different tools in the scientific python ecosystem.
7-
A virtual environment is a workspace into which you can install Python
5+
In this guide we summarize some key commands to set up an environment
6+
with different tools that you might encounter in the scientific python
7+
ecosystem. An environment is a workspace into which you can install Python
88
libraries, separate from what is being used by your operating system.
99

1010
The environment managers that are covered in this how-to guide include:
@@ -14,13 +14,16 @@ The environment managers that are covered in this how-to guide include:
1414
- uv
1515
- pixi
1616

17-
In each of these examples we'll create a new virtual environment related to our project called `science`
18-
(you can use whichever name you prefer!). We'll activate the environment, install some dependencies, and see
19-
an example of installing dependencies from a file.
17+
In each of these examples we'll create a new virtual environment related to our
18+
project called `science` (you can use whichever name you prefer!). We'll activate
19+
the environment, install some dependencies, and see
20+
an example of installing dependencies from an existing file. You may encounter
21+
files like `requirements.txt`, `environment.yml` or `pyproject.toml` that specify
22+
needed dependencies for a project.
2023

2124
### Set up a virtual environment with venv
2225

23-
With venv we'll have our virtual environment associated with our project folder called `science`.
26+
With venv to create environment associated with a project folder called `science`.
2427

2528
```
2629
python -m venv science
@@ -52,6 +55,9 @@ Remember to re-activate your environment every time you open a new terminal, usi
5255
source science/bin/activate
5356
```
5457

58+
You can find more information on using venv for packaging
59+
[here](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).
60+
5561
### Set up an environment using conda
5662

5763
With conda, we can create a new environment named science (-n is the same as passing --name):
@@ -87,6 +93,9 @@ Remember to re-activate your environment every time you open a new terminal:
8793
conda activate science
8894
```
8995

96+
You can find more information on using conda for environments
97+
[here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).
98+
9099
### Set up an environment using mamba
91100

92101
With mamba, like conda, we can create a new environment named science (-n is the same as passing --name):
@@ -120,6 +129,9 @@ Remember to re-activate your environment every time you open a new terminal:
120129
mamba activate science
121130
```
122131

132+
You can find more information on using mamba in the
133+
[mamba user guide](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html).
134+
123135
### Set up a virtual environment using uv
124136

125137
To create a new environment using uv in our project folder called `science`:
@@ -192,7 +204,7 @@ pixi shell --environment=<envname>
192204
```
193205

194206
You can find more information on using pixi
195-
[here](https://docs.astral.sh/uv/pip/environments/#creating-a-virtual-environment).
207+
[here](https://prefix.dev/docs/pixi/basic_usage).
196208

197209

198210

0 commit comments

Comments
 (0)