|
4 | 4 |
|
5 | 5 | ### Python and Jupyter Notebooks |
6 | 6 |
|
7 | | -[Python](https://python.org) is a popular language for scientific computing, and great for general-purpose programming as well. |
8 | | -For this workshop we use Python version 3.x. |
9 | | -Installing all of its scientific packages individually can be a bit difficult, so we provide an environment file to help you take care of them all together. |
10 | | -We will use the _Miniforge_ distribution of Python. |
| 7 | +- [Python](https://python.org) is a popular language for |
| 8 | + scientific computing, and great for general-purpose programming as |
| 9 | + well. For this workshop we use Python version 3.x. |
| 10 | + Installing all of its scientific packages individually can be |
| 11 | + a bit difficult, so we recommend an all-in-one installer. |
| 12 | + We will use Anaconda or Miniconda. |
| 13 | + They both use [Conda](https://conda.io/en/latest/), the main difference is |
| 14 | + that Anaconda comes with a lot of packages pre-installed. |
| 15 | + With Miniconda you will need to install the required packages. |
| 16 | + We recommend using the Anaconda installation instructions. |
| 17 | + |
| 18 | +:::::::::::::::: spoiler |
| 19 | + |
| 20 | +## Anaconda installation |
| 21 | + |
| 22 | +Download and install [Anaconda](https://www.anaconda.com/distribution/#download-section). |
| 23 | +Remember to choose the installer for Python 3.x. |
| 24 | +Anaconda does not include the plotting package plotnine. To install this package, open your terminal application and |
| 25 | +type: |
11 | 26 |
|
12 | | -Please refer to the [Python section of the workshop website for installation instructions](https://carpentries.github.io/workshop-template/install_instructions/#python). |
| 27 | +```bash |
| 28 | +conda install -c conda-forge plotnine |
| 29 | +``` |
13 | 30 |
|
14 | | -#### Launching Jupyter |
| 31 | +::::::::::::::::::::::::: |
15 | 32 |
|
16 | | -:::::::::::::::::::::::::::::::::::::::::: spoiler |
| 33 | +:::::::::::::::: spoiler |
17 | 34 |
|
18 | | -##### Windows |
| 35 | +## Miniconda installation |
19 | 36 |
|
20 | | -After following the instructions above, search for the application 'Miniforge Prompt' and open it. |
21 | | -Type the following commands, pressing <kbd>Enter</kbd> after each one: |
| 37 | +Miniconda is a "light" version of Anaconda. If you install and use Miniconda |
| 38 | +you will also need to install the workshop packages. |
22 | 39 |
|
23 | | -```bash |
24 | | -conda activate carpentries |
25 | | -jupyter notebook |
26 | | -``` |
27 | | - |
28 | | -:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 40 | +Download and install [Miniconda](https://docs.conda.io/en/latest/miniconda.html) |
| 41 | +following the instructions. Remember to choose the installer for |
| 42 | +Python 3.x. |
29 | 43 |
|
30 | | -:::::::::::::::::::::::::::::::::::::::::: spoiler |
| 44 | +From your terminal application, type: |
31 | 45 |
|
32 | | -##### MacOS |
| 46 | +```bash |
| 47 | +conda list |
| 48 | +``` |
33 | 49 |
|
34 | | -After following the instructions above, open the Terminal application (inside Applications/Utilities). |
35 | | -Type the following commands, pressing <kbd>Enter</kbd> after each one: |
| 50 | +To install the packages we'll be using in the workshop, type: |
36 | 51 |
|
37 | 52 | ```bash |
38 | | -conda activate carpentries |
39 | | -jupyter notebook |
| 53 | +conda install -y numpy pandas matplotlib jupyter |
| 54 | +conda install -c conda-forge plotnine |
40 | 55 | ``` |
41 | | -:::::::::::::::::::::::::::::::::::::::::::::::::: |
42 | | - |
43 | | -:::::::::::::::::::::::::::::::::::::::::: spoiler |
44 | 56 |
|
45 | | -##### Linux |
| 57 | +::::::::::::::::::::::::: |
46 | 58 |
|
47 | | -After following the instructions above, search for the application 'Miniforge Prompt' and open it. |
48 | | -Type the following commands, pressing <kbd>Enter</kbd> after each one: |
| 59 | +After installing either Anaconda or Miniconda and the workshop packages, |
| 60 | +launch a Jupyter notebook by typing this command from the terminal: |
49 | 61 |
|
50 | 62 | ```bash |
51 | | -conda activate carpentries |
52 | 63 | jupyter notebook |
53 | 64 | ``` |
54 | 65 |
|
55 | | -:::::::::::::::::::::::::::::::::::::::::::::::::: |
56 | | - |
57 | | -The notebook should open automatically in your browser. |
58 | | -If it does not or you wish to use a different browser, open this link: [http://localhost:8888](https://localhost:8888). |
| 66 | +The notebook should open automatically in your browser. If it does not or you |
| 67 | +wish to use a different browser, open this link: [http://localhost:8888](https://localhost:8888). |
59 | 68 |
|
60 | 69 | For a brief introduction to Jupyter Notebooks, please consult our |
61 | | -[Introduction to Jupyter Notebooks](https://datacarpentry.org/python-ecology-lesson/jupyter_notebooks/) page. |
| 70 | +[Introduction to Jupyter Notebooks](https://datacarpentry.org/python-ecology-lesson/jupyter_notebooks) page. |
| 71 | + |
| 72 | + |
0 commit comments