activate and deactivate virtualenv code example Example 1: deactivate venv deactivate venv Example 2: venv python deactivate $ deactivate