“
Virtual environments provide activation and deactivation scripts that modify the shell environment to use the virtual environment’s Python interpreter and modify the shell’s PATH variable to prioritize the virtual environment’s binary directory for package execution. This allows you to switch between virtual environments seamlessly within a shell session.
”
”
Jörg Richter (Python for Experienced Java Developers)