Automating Python Virtual Environments with Zsh on macOS
Automating Python Virtual Environments with Zsh on macOS Managing Python virtual environments can be tedious - having to manually activate and deactivate them as you move between projects. I decided to create a script that will automatically activate virtual environment. When you cd into a directory containing a .venv folder. When you leave, it will deactivate it.
Installing Zsh While macOS comes with zsh as the default shell since Catalina (10.15), you may want to ensure you have the latest version. The easiest way to install or update zsh is using Homebrew: