exit python virtualenv code example Example 1: how to exit virtualenv $ deactivate Example 2: deactivate venv deactivate venv Example 3: exit venv python $ deactivate