Activate a virtual environment on Linux or macOS.
Section: Activate and deactivate
Activate on bash/zsh
bash
bash
source .venv/bin/activateExplanation
After activation, `python` and `pip` resolve to the environment versions until you deactivate.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Activate and deactivate