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