nerdexam
Cisco

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

Network Programmability Foundation

Question

What is a benefit of Python virtual environments?

Exhibit

300-835 question #34 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)
  • A
    93% (28)
  • C
    3% (1)
  • D
    3% (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

#Python virtual environments#Package management#Dependency isolation

Community Discussion

No community discussion yet for this question.

Full 300-835 Practice