Free | No tracking | Every fact with a source|German and English

Glossary / Software and setup

venv (virtual environment) – explained simply

A venv is a separate folder with its own Python packages, so different AI tools don't interfere with each other.

Also: virtual environment, Virtual Environment, virtualenv, .venv

Different tools often need different versions of the same packages. If you install everything into one shared Python, the second tool might break the first. A virtual environment is like a separate toolbox for each project: whatever you put in it stays there.

According to the Python documentation, you create one with python -m venv followed by the folder name, for example python -m venv .venv. On Windows, activate it in PowerShell with .venv\Scripts\Activate.ps1, and in Command Prompt with .venv\Scripts\activate.bat. You can leave it with deactivate.

A venv is considered disposable: if something breaks, delete the folder and create it again instead of repairing or moving it.

What does that mean for you? Make sure the correct venv is active before you install anything with pip; otherwise the package ends up in the wrong Python.

Related terms

Errors where that matters

Sources