Virtual Environment
PronunciationVER-choo-ul en-VY-run-ment
Definition
A virtual environment is a private folder holding its own Python and installed packages for one project, so projects don't interfere with each other.
Where you hear it
In setup instructions (python -m venv .venv), onboarding docs, and when two projects need different versions of a library.
Examples
Create and activate a virtual environment before installing anything.
It works in my venv but fails on the server because the versions differ.
Each project has its own virtual environment, so old library versions do not clash.
Common mistake
Installing packages globally, or forgetting to activate the environment, so the command uses the wrong Python.
Don't confuse with
A container, which isolates the whole operating system layer. A virtual environment only isolates Python packages.
Say it at work
- In a meeting or chat
Did you activate the venv?
- In an email or ticket
Delete the .venv folder and recreate it; it is disposable.
Keep exploring
More in DevOps & Cloud