how to deactivate python virtualenv code example Example 1: deactivate venv deactivate venv Example 2: py how to deactivate venv $ deactivate or $ conda deactivate