Issue 13 · Nov 2–8, 2026Editions · Glossary · Archive · Method · RSS · HU / ENG

News of the AI era, curated weekly

Glossary › Developer basics

virtual environment

advancedwidespread

An isolated folder on your computer where a Python program runs with its own add-ons without interfering with other programs.

In plain terms

Imagine preparing a separate tray for every recipe in your kitchen: one holds flour and sugar for cookies, another holds paprika and onions for stew. Nothing gets mixed up, and if you discard one tray, the other remains untouched. A virtual environment does exactly this for programs.

Programs written in Python almost always rely on add-ons written by others, known as packages. The problem is that one program needs an old version of a package while another needs the new one, and the two cannot coexist in the same place. A virtual environment gives each project its own separate shelf for its packages.

In the AI world, this is everyday: almost every open-source AI tool's installation guide starts with creating a virtual environment. Coding agents also regularly create such environments before installing anything, so as not to mess up the rest of your machine.

How it works

  1. With one command, you create a new folder next to your project (often called .venv); this contains a copy of the Python interpreter or a reference to it, and an empty space for packages.
  2. You 'activate' the environment: from then on, the command-line window looks for Python and packages in this folder, not in the machine's common location.
  3. What you install afterward goes only into this folder, so your other projects and the system's own Python remain unchanged.
  4. You save the list of installed packages in a small text file (such as requirements.txt), from which anyone else can rebuild the same environment on their own machine.
  5. If it is no longer needed or something breaks, simply delete the folder and create a new one with a clean slate.

An everyday example

You want to try an AI tool downloaded from GitHub, and the first line of the guide is: 'python -m venv .venv'. This command creates a small separate box into which the tool's dependencies are placed. If you later get tired of it, deleting the folder makes these dependencies disappear from your machine. Files downloaded elsewhere, such as large AI models and the installer cache, may remain.

Who is affected

developerOn a daily basis, it keeps projects separate so that updating one does not break the other. → Code
parent, student, teacherAnyone learning programming or data analysis in Python encounters it in one of the first lessons, and many beginner error messages can be traced back to it. → Education & Family
employeeIf you run an AI tool or coding agent on your own machine for your work, it will likely create a virtual environment, and it is good to understand what the .venv folder is. → Work & HR

A common misconception

MythThe virtual environment is a safe sandbox from which the program cannot escape and cannot cause damage to the machine.
In realityIt only keeps packages separate and provides no protection: the program running inside accesses your files and the internet just like any other. True isolation is required for untrusted code: a sandbox, a carefully configured container, or a virtual machine.

Limits and risks

Similar, but not the same

Related concepts

Broader

development environment, isolation, dependency management

Narrower

conda environment

On the edge

Package manager, dependency, requirements.txt, container, sandbox, Python

A brief history

The idea was popularized by a tool called virtualenv, released by Ian Bicking in 2007. The solution became an integrated part of the language in 2012, with Python version 3.3, under the name venv.

Where things stand

At the end of 2026, this is the default practice in Python development, and most guides take it for granted. Newer, faster tools (such as uv) and coding agents increasingly create it automatically, so you often do not even notice.

Status: 2026 November

Also known as

virtual environment · virtual environment · venv · .venv · virtualenv · Python virtual environment · Python environment · Python virtual environment

Sources

This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.