Virtual Environment
Virtual Environment — A virtual environment is an isolated Python environment that manages project-specific dependencies without affecting system Python. Virtual environments solve dependency conflicts by creating isolated directories with their own Python binary and packages. Use `venv` (built-in) to create them. Always activate the environment before installing packages. Common tools include `venv`, `virtualenv`, `pipenv`, and `poetry` for more advanced dependency management. This term relates to the Sys Module category of the reference. You will meet virtual environment in practice when working with APIs such as sys.argv, sys.exit(), sys.path, sys.version. Related terms: Decorator, Generator, Context Manager, GIL (Global Interpreter Lock), Duck Typing, List Comprehension. Understanding virtual environment makes the rest of the Python documentation noticeably easier to follow, because the concept recurs across function references, guides, snippets, and error messages you will meet in real projects. Look up more definitions in the Python glossary, or put the concept into practice with an example from the Python playground.