1. Home
  2. Data Science
  3. Python
  4. How do you activate a virtual environment in Python using…

Added 10 Feb 2024

How do you activate a virtual environment in Python using virtualenv?

  1. activate
  2. venv activate
  3. source activate Correct answer
  4. virtualenv activate

Correct answer

C. source activate

18 views

MCQSEXAM

Explanation

In virtualenv, to activate a virtual environment on Unix-based systems (such as Linux and macOS), you use the 'source' command followed by the path to the 'activate' script in the virtual environment's 'bin' directory. For example, 'source /path/to/venv/bin/activate'.

Doubts & discussion

Not sure why the answer is C? 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