nerdexam
CompTIA

XK0-006 · Question #149

Which of the following is the first step when starting a new Python project on a Linux system?

The correct answer is A. python -m venv /path/to/project. Creating a virtual environment is the first step because it provides an isolated Python runtime for the project, allowing dependencies to be managed independently without affecting the system- wide Python installation.

Automation, Orchestration, and Scripting

Question

Which of the following is the first step when starting a new Python project on a Linux system?

Options

  • Apython -m venv /path/to/project
  • Bpython -m pip install -r /path/to/project
  • Cexport PYTHON_PATH:/path/to/project
  • Dpython -m source /path/to/project

How the community answered

(31 responses)
  • A
    90% (28)
  • C
    3% (1)
  • D
    6% (2)

Explanation

Creating a virtual environment is the first step because it provides an isolated Python runtime for the project, allowing dependencies to be managed independently without affecting the system- wide Python installation.

Topics

#Python venv#virtual environment#Python project setup#dependency isolation

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice