VIRTUALENV(1)

๐Ÿ“ฆ
version 21.5.1 ยท 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– VIRTUALENV(1) ๐Ÿ’–

okay bestie, welcome to the General Commands Manual โ€” section 1, the big leagues. this is the virtualenv page, and i'm gonna walk you through it like we're texting at 2am. grab a snack. ๐Ÿ“


โœจ NAME โœจ

virtualenv โ€” the Python virtual environment creator. that's it, that's the whole vibe. she makes worlds. ๐ŸŒˆ


โœจ SYNOPSIS โœจ

virtualenv [options...] dest

โœจ DESCRIPTION โœจ

so basically the virtualenv utility creates virtual Python instances, and every single one of them gets invoked with its own personal Python executable. main character energy, truly. ๐Ÿ‘‘

each instance can have a totally different set of modules, and you install those via easy_install. and the best part? virtual Python instances can also be created without root access. no sudo, no begging, no nothing. we love a permission-free queen. ๐Ÿ’…


๐ŸŒธ optional arguments: ๐ŸŒธ

  • --version โ€” display the version of the virtualenv package and it's location, then exit
  • --with-traceback โ€” on failure also display the stacktrace internals of virtualenv (default: False)
  • --read-only-app-data โ€” use app data folder in read-only mode (write operations will fail with error) (default: False)
  • --app-data APP_DATA โ€” a data folder used as cache by the virtualenv (default: ~/.local/share/virtualenv)
  • --reset-app-data โ€” start with empty app data folder (default: False)
  • --upgrade-embed-wheels โ€” trigger a manual update of the embedded wheels (default: False)
  • -h, --help โ€” show help and exit

๐ŸŒธ verbosity: ๐ŸŒธ

okay so the whole vibe here is: verbosity = verbose - quiet, default INFO, and the mapping goes like this => CRITICAL=0, ERROR=1, WARNING=2, INFO=3, DEBUG=4, NOTSET=5. math but make it gossip. ๐Ÿงฎ

  • -v, --verbose โ€” increase verbosity (default: 2)
  • -q, --quiet โ€” decrease verbosity (default: 0)

๐Ÿฆ‹ discovery: ๐Ÿฆ‹

this section is literally about discovering and providing a target interpreter. it's giving treasure hunt. ๐Ÿ”

  • --discovery {builtin} โ€” interpreter discovery method (default: builtin)
  • -p py, --python py โ€” target interpreter for which to create a virtual (either absolute path or identifier string) (default: /usr/bin/python3)
  • --try-first-with py_exe โ€” try first these interpreters before starting the discovery (default: [])

๐ŸŽ€ creator: ๐ŸŽ€

options for creator builtin. yes she named a whole section after herself. iconic.

  • --creator {builtin,cpython3-posix,venv} โ€” create environment via (builtin = cpython3-posix) (default: builtin)
  • dest โ€” directory to create virtualenv at
  • --clear โ€” remove the destination directory if exist before starting (will overwrite files otherwise) (default: False)
  • --no-vcs-ignore โ€” don't create VCS ignore directive in the destination directory (default: False)
  • --system-site-packages โ€” give the virtual environment access to the system site-packages dir (default: False)
  • --symlinks โ€” try to use symlinks rather than copies, when symlinks are not the default for the platform (default: True)
  • --copies, --always-copy โ€” try to use copies rather than symlinks, even when symlinks are the default for the platform (default: False)
heads up bestie: --clear is the dramatic one โ€” it removes the destination directory if it exists before starting. and if you don't pass it, files get overwritten anyway. choose your fighter. ๐Ÿ’€

๐ŸŒˆ seeder: ๐ŸŒˆ

options for seeder app-data. sprinkling the good stuff. ๐ŸŒฑ

  • --seeder {app-data,pip} โ€” seed packages install method (default: app-data)
  • --no-seed, --without-pip โ€” do not install seed packages (default: False)
  • --download โ€” pass to enable download of the latest pip, setuptools, and wheel from PyPI (default: False)
  • --no-download, --never-download โ€” pass to disable download of the latest pip, setuptools, and wheel from PyPI (default: True)
  • --extra-search-dir d [d ...] โ€” a path containing wheels the seeder may also use beside bundled (can be set 1+ times) (default: [])
  • --pip version โ€” pip version to install, bundle for bundled (default: latest)
  • --setuptools version โ€” setuptools version to install, bundle for bundled (default: latest)
  • --wheel version โ€” wheel version to install, bundle for bundled (default: latest)
  • --no-pip โ€” do not install pip (default: False)
  • --no-setuptools โ€” do not install setuptools (default: False)
  • --no-wheel โ€” do not install wheel (default: False)
  • --no-periodic-update โ€” disable the periodic (once every 14 days) update of the embedded wheels (default: True)
  • --symlink-app-data โ€” symlink the python packages from the app-data folder (requires seed pip>=19.3) (default: False)

๐Ÿ’œ activators: ๐Ÿ’œ

options for activation scripts. the moment everyone's been waiting for. โœจ

  • --activators comma_sep_list โ€” activators to generate - default is all supported (default: bash,cshell,fish,powershell,python,xonsh)
  • --prompt prompt โ€” provides an alternative prompt prefix for this environment (default: None)

config file $HOME/.config/virtualenv/virtualenv.ini (change via env var VIRTUALENV_CONFIG_FILE)

yes bestie, there's a config file. you can swap it out with the env var VIRTUALENV_CONFIG_FILE. customize your life. ๐Ÿซถ

๐Ÿ’– AUTHORS ๐Ÿ’–

This man-page was created using help2man and then updated by Scott Kitterman <scott@kitterman.com> and is licensed under the same terms as virtualenv.


and that's the whole page, no cap. this one lives in the General Commands Manual, and the footer just says VIRTUALENV(1) back at you like a little echo. bye bestie, go make some virtual environments ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from