venv.create()
venv.create() is a Python function in the Venv Module category. Creates a Python virtual environment in the specified directory. The syntax is venv.create(env_dir, system_site_packages=False, clear=False, symlinks=False, upgrade=False, with_pip=False, prompt=None, upgrade_deps=False). Returns: None. A typical example: import venv
venv.create("myenv", with_pip=True)
# Creates ./myenv with Python, pip, and standard lib. A close sibling is venv.EnvBuilder(), which customizable virtual environment builder. More about this category: Virtual environment creation — create, EnvBuilder. For a broader walkthrough, read the Venv Module guide. Related Venv Module entries: venv.EnvBuilder(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try venv.create() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.