Skip to content

Commit f3da46f

Browse files
Update figures to display
1 parent 8d5f112 commit f3da46f

File tree

2 files changed

+52
-9
lines changed

2 files changed

+52
-9
lines changed
-39.7 KB
Loading

short_courses/virtual_environments.ipynb

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,21 @@
4949
"\n",
5050
"The first step on macOS to create a virtual environment is to open the 'Terminal'. This can be done by searching for the program and clicking on the program icon, which is:\n",
5151
"\n",
52-
"<img src=\"figures/virtual_environments/terminal_icon.png\" alt=\"An image of the macOS Terminal Icon\" width=\"300\"/>\n",
52+
"\n",
53+
"```{image} figures/virtual_environments/terminal_icon.png\n",
54+
":alt: An image of the macOS Terminal Icon\n",
55+
":width: 300px\n",
56+
":align: center\n",
57+
"```\n",
5358
"\n",
5459
"This should then open a window such as: \n",
5560
"\n",
56-
"<img src=\"figures/virtual_environments/macos_terminal.png\" alt=\"An image of the macOS Terminal\" width=\"800\"/>\n",
61+
"```{image} figures/virtual_environments/macos_terminal.png\n",
62+
":alt: An image of the macOS Terminal\n",
63+
":class: bg-primary mb-1\n",
64+
":width: 1000px\n",
65+
":align: center\n",
66+
"```\n",
5767
"\n",
5868
"#### Verifying Python Installation\n",
5969
"\n",
@@ -121,7 +131,12 @@
121131
"\n",
122132
"Your command line should now have a hint that highlights which environment you are currently in. This is key as it will make it easy at a glance to understand which environment you are in. Your command line should now look something like: \n",
123133
"\n",
124-
"<img src=\"figures/virtual_environments/venv_terminal_hint.png\" alt=\"An image of the macOS Terminal with venv environment hint\" width=\"500\"/>\n",
134+
"```{image} figures/virtual_environments/venv_terminal_hint.png\n",
135+
":alt: An image of the macOS Terminal with venv environment hint\n",
136+
":class: bg-primary mb-1\n",
137+
":width: 1000px\n",
138+
":align: center\n",
139+
"```\n",
125140
"\n",
126141
"You can now deactivate the environment with the following command:\n",
127142
"\n",
@@ -173,20 +188,40 @@
173188
"2. Typing **cmd** or **Command Prompt**\n",
174189
"3. Clicking on the **Command Prompt** icon.\n",
175190
"\n",
176-
"\n",
177-
"<img src=\"figures/virtual_environments/Command_Prompt.png\" alt=\"An image of the Windows Command Prompt Icon\" width=\"500\"/>\n",
191+
"```{image} figures/virtual_environments/Command_Prompt.png\n",
192+
":alt: An image of the Windows Command Prompt Icon\n",
193+
":class: bg-primary mb-1\n",
194+
":width: 500px\n",
195+
":align: center\n",
196+
"```\n",
178197
"\n",
179198
"Alternatively, you may use **PowerShell** by typing **PowerShell** in the Start menu and selecting it.\n",
180199
"\n",
181-
"<img src=\"figures/virtual_environments/Powershell.png\" alt=\"An image of the Windows PowerShell Icon\" width=\"500\"/>\n",
200+
"```{image} figures/virtual_environments/Powershell.png\n",
201+
":alt: An image of the Windows PowerShell Icon\n",
202+
":class: bg-primary mb-1\n",
203+
":width: 500px\n",
204+
":align: center\n",
205+
"```\n",
182206
"\n",
183207
"When the Command Prompt is opened, you will see a window such as:\n",
184208
"\n",
185-
"<img src=\"figures/virtual_environments/Command_Prompt_Terminal.png\" alt=\"An image of the Windows Command Prompt Icon\" width=\"500\"/>\n",
209+
"```{image} figures/virtual_environments/Command_Prompt_Terminal.png\n",
210+
":alt: An image of the Windows Command Prompt Icon\n",
211+
":class: bg-primary mb-1\n",
212+
":width: 1000px\n",
213+
":align: center\n",
214+
"```\n",
186215
"\n",
187216
"or if you are using PowerShell then you will see:\n",
188217
"\n",
189-
"<img src=\"figures/virtual_environments/Powershell_Terminal.png\" alt=\"An image of the Windows PowerShell Terminal\" width=\"500\"/>\n",
218+
"\n",
219+
"```{image} figures/virtual_environments/Powershell_Terminal.png\n",
220+
":alt: An image of the Windows PowerShell Terminal\n",
221+
":class: bg-primary mb-1\n",
222+
":width: 1000px\n",
223+
":align: center\n",
224+
"```\n",
190225
"\n",
191226
"\n",
192227
"#### Verifying Python Installation \n",
@@ -300,7 +335,7 @@
300335
"\n",
301336
"This behavior is the main advantage of virtual environments: they let you maintain different sets (and versions) of Python libraries for different projects, all on the same machine, without interference. For instance, you might need Package X that only works with Package Y version 1 for one project, while another project needs the newer Package Y version 2. With virtual environments, you can install each combination of packages only once and quickly switch between them.\n",
302337
"\n",
303-
"### Python Environment and Dependency Management Tools \n",
338+
"## Python Environment and Dependency Management Tools \n",
304339
"\n",
305340
"There are a number of different options available for environmental and dependency management tools. Below are some of the most widely used tools for this task within Python. The following sections act as a set of signposts to the more comprehensive guides to their use on their official websites. \n",
306341
"\n",
@@ -442,6 +477,14 @@
442477
"```\n",
443478
"\n"
444479
]
480+
},
481+
{
482+
"cell_type": "code",
483+
"execution_count": null,
484+
"id": "301c5b93-8c6e-4b23-ac74-92e2c9f9a2a8",
485+
"metadata": {},
486+
"outputs": [],
487+
"source": []
445488
}
446489
],
447490
"metadata": {

0 commit comments

Comments
 (0)