Skip to content

Commit 8d5f112

Browse files
Rewrite learning objectives based on new content
1 parent a0b01c5 commit 8d5f112

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

short_courses/virtual_environments.ipynb

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
5-
"id": "87ac0634-90b2-4ea4-9c3e-bcdaada811f6",
6+
"id": "add8c161-08a9-4e44-806e-5f1e9cb65c27",
67
"metadata": {},
78
"source": [
89
"# Virtual Environments\n",
910
"\n",
1011
"## Course Objectives\n",
11-
"- Understand the importance of using virtual environments in Python development\n",
12-
"- Differentiate between various tools for managing virtual environments: `venv`, `Conda`, `Pipenv`, and `Poetry`\n",
13-
"- Create and activate a virtual environment using `venv`\n",
14-
"- Use `Conda` to manage environments and packages.\n",
15-
"- Utilize `Pipenv` and `Poetry` for dependency management and virtual environments\n",
12+
"- **Explain the role of virtual environments** \n",
13+
" Understand why virtual environments are essential in Python development and how they help manage project dependencies and avoid conflicts.\n",
14+
"\n",
15+
"- **Create and activate a virtual environment with `venv`** \n",
16+
" Learn how to set up and use virtual environments using the built-in Python `venv` module on both macOS and Windows.\n",
17+
"\n",
18+
"- **Highlight different virtual environment tools** \n",
19+
" Identify the differences and advantages of `venv`, `Conda`, `Pipenv`, and `Poetry` for Python environment and dependency management.\n",
20+
"\n",
1621
"\n",
1722
"## Overview of Virtual Environments\n",
1823
"\n",
@@ -30,14 +35,8 @@
3035
" If one project needs `libraryX==1.2.0` and another needs `libraryX==2.0.0`, separate virtual environments prevent these requirements from clashing.\n",
3136
"\n",
3237
"4. **System Integrity** \n",
33-
" Installing or updating packages system-wide can break other applications. Virtual environments confine these changes to the environment, leaving system Python untouched."
34-
]
35-
},
36-
{
37-
"cell_type": "markdown",
38-
"id": "7af6e510-f0c1-40fc-9190-90e8cbd97775",
39-
"metadata": {},
40-
"source": [
38+
" Installing or updating packages system-wide can break other applications. Virtual environments confine these changes to the environment, leaving system Python untouched.\n",
39+
"\n",
4140
"## Using venv across different operating systems \n",
4241
"\n",
4342
"Creating an exhaustive list of all of the different environments and package managers across all the different operating systems would be far too extensive to include as a short course here. As such, the two most common operating systems in use today, MacOS and Windows, are included here with the manager that is bundled with Python already, venv allowing you to get started with one manager on your operating system and explore other managers in your own time via the tutorials linked within this course. All of the managers' websites will highlight the pros of the manager that they are proposing, so the manager you should use will depend on your personal preference. \n",
@@ -299,14 +298,8 @@
299298
"```\n",
300299
"you should see pandas listed among your installed packages. This means you can use `import pandas` with Python scripts in this environment. If you leave the environment by typing `deactivate` and then check `pip list` again (outside the environment), you will not see pandas listed.\n",
301300
"\n",
302-
"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."
303-
]
304-
},
305-
{
306-
"cell_type": "markdown",
307-
"id": "8ad92074-fe51-492c-834c-c4c7f7b75b7d",
308-
"metadata": {},
309-
"source": [
301+
"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+
"\n",
310303
"### Python Environment and Dependency Management Tools \n",
311304
"\n",
312305
"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",
@@ -446,14 +439,9 @@
446439
"\n",
447440
"```sh\n",
448441
"pipx install poetry\n",
449-
"```"
442+
"```\n",
443+
"\n"
450444
]
451-
},
452-
{
453-
"cell_type": "markdown",
454-
"id": "a3c2f2ff-9e5a-40f8-bc0b-0b086e2de990",
455-
"metadata": {},
456-
"source": []
457445
}
458446
],
459447
"metadata": {

0 commit comments

Comments
 (0)