Skip to content

Commit 1f975b6

Browse files
committed
markdown source builds
Auto-generated via `{sandpaper}` Source : 4515a95 Branch : main Author : Cody Hennesy <[email protected]> Time : 2025-03-20 19:50:02 +0000 Message : Merge pull request #149 from LibraryCarpentry/use-miniforge Update setup instructions
1 parent c9664bc commit 1f975b6

File tree

6 files changed

+33
-68
lines changed

6 files changed

+33
-68
lines changed

Diff for: data-visualisation.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,9 @@ albany['circulation'].plot(kind='hist', bins=20,
141141
## Use Plotly for interactive plots
142142

143143
Let’s switch back to the full DataFrame in `df_long` and use another
144-
plotting package in Python called Plotly. First let’s install and then use the package.
144+
plotting package in Python called Plotly.
145145

146146
```python
147-
# uncomment below to install plotly if the import fails.
148-
# !pip install plotly
149-
150-
# if you didn't install Jupyter via Anaconda, you may also need to install ipywidgets.
151-
# !pip install ipywidgets
152-
153147
import plotly.express as px
154148
```
155149

Diff for: getting-started.md

+15-16
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Here a few areas where you might apply Python in your work.
5151

5252
## Use JupyterLab to edit and run Python code.
5353

54-
If you haven't already done so, see [the setup instructions](../learners/setup.md) for details on how to install JupyterLab and Python via Anaconda. The setup instructions also walk you through the steps you should follow to create an `lc-python` folder on your Desktop, and to download and unzip the dataset we'll be working with inside of that directory.
54+
If you haven't already done so, see [the setup instructions](../learners/setup.md) for details on how to install JupyterLab and Python using Miniforge. The setup instructions also walk you through the steps you should follow to create an `lc-python` folder on your Desktop, and to download and unzip the dataset we'll be working with inside of that directory.
5555

5656
### Getting started with JupyterLab
5757
To run Python, we are going to use Jupyter Notebooks via [JupyterLab][jupyterlab]. Jupyter notebooks are common tools for data science and visualization, and serve as a convenient environment for running Python code interactively where we can view and share the results of our Python code.
@@ -71,40 +71,40 @@ Jupyter notebooks let us execute and view the results of our Python code immedia
7171
- Each notebook contains one or more cells that contain code, text, or images.
7272

7373
### Start JupyterLab
74-
Once you have created the `lc-python` directory on your Desktop, you can start JupyterLab by opening a shell command line interface or by using Anaconda Navigator.
74+
Once you have created the `lc-python` directory on your Desktop, you can start JupyterLab by opening a shell command line interface.
7575

7676
#### Mac users - Command Line
7777

7878
1. Press the <kbd>cmd</kbd> + <kbd>spacebar</kbd> keys and search for `Terminal`. Click the result or press <kbd>return</kbd>. (You can also find `Terminal` in your `Applications` folder, under `Utilities`.)
79-
2. After you have launched Terminal, change directories to the `lc-python` folder you created earlier and type `jupyter lab`. Note that the `$` sign is used to indicate a command to be typed on the command prompt, but we never type the `$` sign itself, just what follows after it.
79+
2. After you have launched Terminal, change directories to the `lc-python` folder you created earlier.
80+
3. Next run `conda activate carpentries` to launch a Python environment which includes Jupyter Notebooks and other tools we will need to proceed through the lesson.
81+
4. Finally, type `jupyter lab` which should open a browser window where you can run Jupyter Notebooks.
82+
83+
Note that the `$` sign is used to indicate a command to be typed on the command prompt, but we never type the `$` sign itself, just what follows after it.
8084

8185
```bash
8286
$ cd ../Desktop/lc-python
87+
$ conda activate carpentries
8388
$ jupyter lab
8489
```
8590

8691
#### Windows users - Command Line
8792

8893
To start the JupyterLab server you will need to access the Anaconda Prompt.
8994

90-
1. Press the <kbd>Windows Logo Key</kbd> and search for `Anaconda Prompt`, click the result or press enter.
95+
1. Press the <kbd>Windows Logo Key</kbd> and search for `Miniforge Prompt`, click the result or press enter.
96+
2. Once you have launched the Miniforge Prompt, change directories to the `lc-python` folder you created earlier. (The example below assumes a starting path of `C:\Users\username`)
97+
3. Next run `conda activate carpentries` to launch a Python environment which includes Jupyter Notebooks and other tools we will need to proceed through the lesson.
98+
4. Finally, type `jupyter lab` which should open a browser window where you can run Jupyter Notebooks.
9199

92-
2. Once you have launched the Anaconda Prompt, type the command `jupyter lab`. Note that the `$` sign is used to indicate a command to be typed on the command prompt, but we never type the `$` sign itself, just what follows after it.
100+
Note that the `$` sign is used to indicate a command to be typed on the command prompt, but we never type the `$` sign itself, just what follows after it.
93101

94102
```bash
95-
$ cd ..\Desktop\lc-python
103+
$ cd \Desktop\lc-python
104+
$ conda activate carpentries
96105
$ jupyter lab
97106
```
98107

99-
#### Start JupyterLab from Anaconda Navigator
100-
If you are unfamiliar with the command line, you can launch JupyterLab by opening the Anaconda Navigator app and choosing the `Launch` button underneath the JuypterLab icon.
101-
102-
First [start Anaconda Navigator (click for detailed instructions on macOS, Windows, and Linux)](https://docs.anaconda.com/free/navigator/getting-started/#navigator-starting-navigator). You can search for Anaconda Navigator via Spotlight on macOS (<kbd>Command</kbd> + <kbd>spacebar</kbd>), or by using the Windows search function (<kbd>Windows Logo Key</kbd>).
103-
104-
After you have launched Anaconda Navigator, click the `Launch` button under JupyterLab. You may need to scroll down to find it. Here is a screenshot of an Anaconda Navigator page similar to the one that should open on either macOS or Windows.
105-
106-
![Launch JupyterLab from Anaconda Navigator](../episodes/fig/0_anaconda_navigator_landing_page.png){alt='screenshot of the launch button for JuypterLab in Anaconda Navigator'}
107-
108108
## The JupyterLab Interface
109109

110110
Launching JupyterLab opens a new tab or window in your preferred web browser. While JupyterLab enables you to run code from your browser, it does not require you to be online. If you take a look at the URL in your browser address bar, you should see that the environment is located at your localhost, meaning it is running from your computer: `http://localhost:8888/lab`.
@@ -191,7 +191,6 @@ You can also use "hotkeys"" to change Jupyter cells from Code to Markdown and ba
191191
- Press the <kbd>y</kbd> key to convert the cell back to Code.
192192
::::::::::::::::::::::::::::::::::::::::::::::::::
193193

194-
[anaconda]: https://docs.anaconda.com/anaconda/install/
195194
[spyder]: https://www.spyder-ide.org/
196195
[jupyterlab]: https://jupyterlab.readthedocs.io/en/stable/
197196

Diff for: index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This lesson is an introduction to programming in Python for library and informat
1919

2020
2. Learners must install Python and JupyterLab, and download the dataset that will be used in the lesson, before the workshop begins.
2121

22-
Please see <a href="#installing-python-using-anaconda">setup instructions below</a> for details.
22+
Please see <a href="#installing-python-using-miniforge">setup instructions below</a> for details.
2323

2424

2525
::::::::::::::::::::::::::::::::::::::::::::::::::

Diff for: libraries.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ The ASCII letters are abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
120120

121121
## Module not found error
122122

123-
Before you can import a Python library, you sometimes will need to download and install it on your machine. Anaconda comes with many of the most popular Python libraries for scientific computing applications built-in, so if you installed Anaconda for this workshop, you'll be able to import many common libraries directly. Some less common tools, like the PyMarc library, however, would need to be installed first.
123+
Before you can import a Python library, you sometimes will need to download and install it on your machine. The Carpentries conda environment that we're using for the workshop installs a number of common Python libraries for academic computing. Since those are available when you activate the environment you'll be able to import many common libraries directly. Some less common tools, like the PyMarc library, however, would need to be installed first.
124124

125125
```python
126126
import pymarc
@@ -130,7 +130,7 @@ import pymarc
130130
ModuleNotFoundError: No module named 'pymarc'
131131
```
132132

133-
You can find out how to install the library by looking at the documentation. [PyMarc](https://pypi.org/project/pymarc/), for example, recommends using a command line tool, `pip`, to install it. You can install with pip in a Jupyter notebook by starting the command with a percentage symbol, which allows you to run shell commands from Jupyter:
133+
You can find out how to install the library by looking at the documentation. [PyMarc](https://pypi.org/project/pymarc/), for example, recommends using a command line tool, `pip`, for installation, though you can also [install PyMarc using conda](https://anaconda.org/asmeurer/pymarc). To install with pip in a Jupyter notebook you can begin the command with a percentage symbol, which allows you to run shell commands from Jupyter:
134134

135135
```python
136136
%pip install pymarc

Diff for: md5sum.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2023-05-08"
33
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2023-05-08"
44
"config.yaml" "751228ef986d86881e913e9993d4e229" "site/built/config.yaml" "2024-06-17"
5-
"index.md" "20e6aecbfd8d4d1ed2cdf54532a936e4" "site/built/index.md" "2024-08-20"
6-
"episodes/getting-started.md" "ae8bffd2a1d221f1647cd56d9bc2c6a3" "site/built/getting-started.md" "2024-10-07"
5+
"index.md" "caae338b4fd531ec1006192920874f97" "site/built/index.md" "2025-03-20"
6+
"episodes/getting-started.md" "839114535f2cb89b08629d66a40a8589" "site/built/getting-started.md" "2025-03-20"
77
"episodes/variables.md" "b4410937474e0325bdd6b68a39d0b1b5" "site/built/variables.md" "2024-06-17"
88
"episodes/lists.md" "088126326332adf54f9b87f03c8bf919" "site/built/lists.md" "2025-03-16"
99
"episodes/functions.md" "499deb6ac29cdd4a00134176ef890616" "site/built/functions.md" "2024-06-17"
10-
"episodes/libraries.md" "389f42d1a82c4fa7b8914a873d32e08b" "site/built/libraries.md" "2024-11-05"
10+
"episodes/libraries.md" "e3b3c8d3d492322fdf7a05006084c3f6" "site/built/libraries.md" "2025-03-20"
1111
"episodes/for-loops.md" "a44b90e5f6f451c1659b7f877e0c0c4d" "site/built/for-loops.md" "2024-06-27"
1212
"episodes/looping-data-sets.md" "ff153b594bf9543fa2ed4890c4d3ef71" "site/built/looping-data-sets.md" "2024-10-29"
1313
"episodes/pandas.md" "5f2461a95e56e8aa3aa6851f12d3d566" "site/built/pandas.md" "2024-06-17"
1414
"episodes/conditionals.md" "b567ac5270b3dc82c4ed119870a0a890" "site/built/conditionals.md" "2024-06-17"
1515
"episodes/writing-functions.md" "0b81f14ebdc51157d861751893131687" "site/built/writing-functions.md" "2024-11-05"
1616
"episodes/tidy.md" "04363bbe35378f8a4829ae04f4c17c2c" "site/built/tidy.md" "2024-11-05"
17-
"episodes/data-visualisation.md" "c4713b131f46fdb0cfb94e1531803f9e" "site/built/data-visualisation.md" "2024-11-05"
17+
"episodes/data-visualisation.md" "b560dfe8e0f6a892c31cbbc60873b7b6" "site/built/data-visualisation.md" "2025-03-20"
1818
"episodes/wrap.md" "6e2c8fe8bab006ad451a481d27982d06" "site/built/wrap.md" "2024-06-17"
1919
"instructors/design.md" "644a2269c636c2de465fe655b899a508" "site/built/design.md" "2023-05-08"
2020
"instructors/instructor-notes.md" "62646361a3b355df21da3707168fee01" "site/built/instructor-notes.md" "2023-05-08"
2121
"learners/discuss.md" "a86dc1c2b937b0dc3b6ac34b145057de" "site/built/discuss.md" "2023-05-08"
2222
"learners/exercises.md" "8f305efe9f670305e9d23140d43ca651" "site/built/exercises.md" "2023-05-08"
2323
"learners/reference.md" "be4b8a891809c85a625fff879855921a" "site/built/reference.md" "2023-05-08"
24-
"learners/setup.md" "389afb1dcad216c0cb1e5302bf494d00" "site/built/setup.md" "2024-09-28"
24+
"learners/setup.md" "534198d96047fc7dbf96a459a484e681" "site/built/setup.md" "2025-03-20"
2525
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-05-08"

Diff for: setup.md

+9-37
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,19 @@
22
title: Setup
33
---
44

5-
## Installing Python Using Anaconda
6-
Python is a popular language for research computing, and great for general-purpose programming as well. Installing all of its research packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer.
5+
## Installing Python Using Miniforge
76

8-
Regardless of how you choose to install it, please make sure you install Python 3.6 or above. The latest 3.x version recommended on [Python.org][python] is fine.
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.
911

10-
We will teach Python using JupyterLab, a programming environment that runs in a web browser (JupyterLab will be installed by Anaconda). For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).
11-
12-
::::::::::::::::: tab
13-
14-
### Windows
15-
16-
[Watch a video tutorial for Windows][video-windows].
17-
18-
1. Open [anaconda.com/download][anaconda-dl] with your web browser.
19-
2. Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer *Anaconda3-...-Windows-x86_64.exe*)
20-
3. Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check *Add Anaconda to my PATH environment variable*.
21-
22-
### Mac
23-
24-
[Watch a video tutorial for Mac][video-mac].
25-
26-
1. Open [anaconda.com/download][anaconda-dl] with your web browser.
27-
2. Download the Anaconda Installer with Python 3 for macOS (you can either use the Graphical or the Command Line Installer).
28-
3. Install Python 3 by running the Anaconda Installer using all of the defaults for installation.
29-
30-
### Linux
31-
32-
Note that the following installation steps require you to work from the shell. If you aren't comfortable doing the installation yourself stop here and request help from the workshop organizers.
33-
34-
1. Open [anaconda.com/download][anaconda-dl] with your web browser.
35-
2. Download the Anaconda Installer with Python 3 for Linux.
36-
3. Open a terminal window and navigate to the directory where the executable is downloaded (e.g., `cd ~/Downloads`).
37-
4. Type `bash Anaconda3` and press <kbd>Tab</kbd> to auto-complete the full file name. The name of file you just downloaded should appear.
38-
5. Press <kbd>Enter</kbd> (or <kbd>Return</kbd> depending on your keyboard). You will follow the text-only prompts. To move through the text, press <kbd>Spacebar</kbd>. Type `yes` and press <kbd>Enter</kbd> to approve the license. Press <kbd>Enter</kbd> (or <kbd>Return</kbd>) to approve the default location for the files. Type `yes` and press <kbd>Enter</kbd> (or <kbd>Return</kbd>) to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).
39-
6. Close the terminal window.
40-
41-
:::::::::::::::::::::::::
12+
Please refer to the [Python section of the workshop website for installation instructions](https://carpentries.github.io/workshop-template/install_instructions/#python).
4213

4314
## JupyterLab
44-
We will teach Python using JupyterLab, a part of a family of [Jupyter][jupyter] tools that includes Jupyter Notebook and JupyterLab, both of which provide interactive web environments where you can write and run Python code. If you installed Anaconda, JupyterLab is installed on your system. If you did not install Anaconda, you can [install JupyterLab][jupyter-install] on its own using conda, pip, or other popular package managers.
15+
We will teach Python using JupyterLab, a part of a family of [Jupyter][jupyter] tools that includes Jupyter Notebook and JupyterLab, both of which provide interactive web environments where you can write and run Python code.
16+
If you followed the instructions linked above, JupyterLab is installed on your system.
17+
Alternatively, you can [install JupyterLab][jupyter-install] on its own using conda, pip, or other popular package managers.
4518

4619
## Download the data
4720

@@ -53,7 +26,6 @@ This lesson uses circulation data in multiple CSV files from the Chicago Public
5326

5427
[python]: https://python.org/downloads
5528
[video-windows]: https://www.youtube.com/watch?v=xxQ0mzZ8UvA
56-
[anaconda-dl]: https://www.anaconda.com/download/
5729
[video-mac]: https://www.youtube.com/watch?v=TcSAln46u9U
5830
[jupyter]: https://docs.jupyter.org/en/latest/
5931
[jupyter-install]: https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html

0 commit comments

Comments
 (0)