Skip to content

Commit 3f05db6

Browse files
Light edits to the setup section (#243)
Co-authored-by: Jarrod Millman <[email protected]>
1 parent 8112ebc commit 3f05db6

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

content/contributors/setup/install.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ itself installed. There are two, largely equivalent, ways of doing
77
that, and we describe both below.
88

99
If you have a working version of Python on your system already (check
10-
by running `python3`), you can skip to setting up a virtual environment.
10+
by running `python` at the terminal), you can skip to "Segment 1: Set up a virtual environment".
1111

1212
## Segment 1: Python.org
1313

@@ -20,23 +20,16 @@ Download the installer from https://www.python.org/downloads/.
2020
A virtual environment is a workspace into which you can install Python
2121
libraries, separate from what is being used by your operating system.
2222

23-
Create a new virtual environment in a directory called
24-
`py3`:
23+
Here, we create a new virtual environment in a directory `science` (you can use whichever name you prefer!):
2524

2625
```
27-
python -m venv py3
26+
python -m venv science
2827
```
2928

30-
Start using it as follows:
29+
Start using it by activating it as follows:
3130

3231
```
33-
source py3/bin/activate
34-
```
35-
36-
Also, make sure you have `pip` installed---that is Python's default package manager:
37-
38-
```
39-
python -m ensurepip
32+
source science/bin/activate
4033
```
4134

4235
You are now ready to install Scientific Python packages using `pip`! For example:
@@ -56,6 +49,12 @@ In [2]: np.linspace(0, 10, 5)
5649
Out[2]: array([ 0. , 2.5, 5. , 7.5, 10. ])
5750
```
5851

52+
Remember to re-activate your environment every time you open a new terminal, using:
53+
54+
```
55+
source science/bin/activate
56+
```
57+
5958
## Segment 2: Miniforge
6059

6160
Miniforge is a small Python distribution based around the conda
@@ -112,3 +111,9 @@ In [1]: import numpy as np
112111
In [2]: np.linspace(0, 10, 5)
113112
Out[2]: array([ 0. , 2.5, 5. , 7.5, 10. ])
114113
```
114+
115+
Remember to re-activate your environment every time you open a new terminal:
116+
117+
```
118+
conda activate science
119+
```

0 commit comments

Comments
 (0)