Implementing Automation for Cisco Data Center Solutions (DCAUTO) — Question 11
A set of automation scripts work with no issue from a local machine, but an experiment needs to take place with a new package found online.
How is this new package isolated from the main code base?
Answer options
- A. Add the new package to your requirements.txt file.
- B. Create a new virtual machine and perform a pip install of the new package.
- C. Perform a pip install of the new package when logged into your local machine as root.
- D. Create a new virtual environment and perform a pip install of the new package.
Correct answer: D
Explanation
The correct answer is D because creating a new virtual environment allows for the isolation of dependencies, ensuring that the new package does not interfere with the main code base. Options A and B do not provide the necessary isolation, while option C installs the package globally, which could lead to conflicts with existing packages.