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)- A90% (28)
- C3% (1)
- D6% (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.