What is the purpose of the '--no-site-packages' flag when creating a virtual environment in Python?
Correct answer
C. To exclude site-specific packages from the virtual environment
20 views
C. To exclude site-specific packages from the virtual environment
20 views
The '--no-site-packages' flag is used when creating a virtual environment in Python to exclude the system-wide site-packages directory from the virtual environment. This ensures that the virtual environment is isolated from the system-wide Python installation and only contains the packages installed specifically for that environment.
Not sure why the answer is C? Ask here and get an explanation.