On this page
venv.create
Up: venv | Next: venv.EnvBuilder
Rel: venv.EnvBuilder, venv.main
Ref: docs.python.org — venv.create
Tags: #public #python3 #stdlib #venv
Import
import venv
from venv import create
Signature & Overview
venv.create(env_dir, system_site_packages=False, clear=False, symlinks=False, with_pip=False, prompt=None, upgrade_deps=False, *, scm_ignore_files=frozenset())
Create a virtual environment in a directory.
Usage
import venv
# Programmatic equivalent of `python3 -m venv .venv`:
# venv.create(".venv", with_pip=True)
assert callable(venv.create)
Gotchas
- Pass
with_pip=Trueif you wantpipbootstrapped inside the new environment.
REPL Inspect
from venv import create
help(create)
Linked from
Related notes
- tuts/python3/stdlib_module/venv/EnvBuilder Linked here; links to this page; shared tags: #stdlib, #venv
- tuts/python3/stdlib_module/venv/main Linked here; links to this page; shared tags: #stdlib, #venv
- tuts/python3/stdlib_module/venv Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib