300-835 · Question #34
What is a benefit of Python virtual environments?
The correct answer is A. separate package dependencies for each application. Python virtual environments solve the real-world problem of dependency conflicts - each project gets its own isolated directory containing its own Python packages and versions, so Project A can use requests==2.28 while Project B uses requests==2.31 without interference (A). Why t
Question
Exhibit
Options
- Aseparate package dependencies for each application
- Bshared libraries across all projects
- Cshared workspace for Python applications
- Ddedicated CPU and memory for each application
How the community answered
(30 responses)- A93% (28)
- C3% (1)
- D3% (1)
Explanation
Python virtual environments solve the real-world problem of dependency conflicts - each project gets its own isolated directory containing its own Python packages and versions, so Project A can use requests==2.28 while Project B uses requests==2.31 without interference (A).
Why the distractors are wrong:
- B is the opposite of the purpose - isolation prevents shared libraries, which cause version conflicts
- C describes a shared workspace, which is also the opposite - virtual environments isolate projects from each other
- D describes containerization/virtualization (like Docker or VMs), not Python's
venv, which has no CPU/memory isolation
Memory tip: Think of venv as a lunchbox - each project packs its own dependencies, so nobody else's food (packages) contaminates yours. The word "virtual" here means a virtual package space, not virtual hardware.
Topics
Community Discussion
No community discussion yet for this question.
