|
49 | 49 | "\n",
|
50 | 50 | "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",
|
51 | 51 | "\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", |
53 | 58 | "\n",
|
54 | 59 | "This should then open a window such as: \n",
|
55 | 60 | "\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", |
57 | 67 | "\n",
|
58 | 68 | "#### Verifying Python Installation\n",
|
59 | 69 | "\n",
|
|
121 | 131 | "\n",
|
122 | 132 | "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",
|
123 | 133 | "\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", |
125 | 140 | "\n",
|
126 | 141 | "You can now deactivate the environment with the following command:\n",
|
127 | 142 | "\n",
|
|
173 | 188 | "2. Typing **cmd** or **Command Prompt**\n",
|
174 | 189 | "3. Clicking on the **Command Prompt** icon.\n",
|
175 | 190 | "\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", |
178 | 197 | "\n",
|
179 | 198 | "Alternatively, you may use **PowerShell** by typing **PowerShell** in the Start menu and selecting it.\n",
|
180 | 199 | "\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", |
182 | 206 | "\n",
|
183 | 207 | "When the Command Prompt is opened, you will see a window such as:\n",
|
184 | 208 | "\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", |
186 | 215 | "\n",
|
187 | 216 | "or if you are using PowerShell then you will see:\n",
|
188 | 217 | "\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", |
190 | 225 | "\n",
|
191 | 226 | "\n",
|
192 | 227 | "#### Verifying Python Installation \n",
|
|
300 | 335 | "\n",
|
301 | 336 | "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",
|
302 | 337 | "\n",
|
303 |
| - "### Python Environment and Dependency Management Tools \n", |
| 338 | + "## Python Environment and Dependency Management Tools \n", |
304 | 339 | "\n",
|
305 | 340 | "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",
|
306 | 341 | "\n",
|
|
442 | 477 | "```\n",
|
443 | 478 | "\n"
|
444 | 479 | ]
|
| 480 | + }, |
| 481 | + { |
| 482 | + "cell_type": "code", |
| 483 | + "execution_count": null, |
| 484 | + "id": "301c5b93-8c6e-4b23-ac74-92e2c9f9a2a8", |
| 485 | + "metadata": {}, |
| 486 | + "outputs": [], |
| 487 | + "source": [] |
445 | 488 | }
|
446 | 489 | ],
|
447 | 490 | "metadata": {
|
|
0 commit comments