1. Home
  2. Data Science
  3. Python
  4. Which command is used to create a virtual environment in…

Added 10 Feb 2024

Which command is used to create a virtual environment in Python using venv?

  1. createenv
  2. venv create
  3. mkvirtualenv
  4. python -m venv Correct answer

Correct answer

D. python -m venv

14 views

MCQSEXAM

Explanation

The 'python -m venv' command is used to create a virtual environment in Python using the built-in venv module. It creates a new directory containing a Python interpreter and a copy of the standard Python library, allowing you to install and manage dependencies separately for each project.

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs