py-venv

Package: WA2L/WinTools 1.2.09
Section: General Commands (1)
Updated: 28 January 2026
Index Return to Main Contents

 

NAME

py-venv - handle Python virtual environment (venv) portable

 

SYNOPSIS

WA2LWinTools/lib/shell/py-venv [ -h | -V ]

py-venv ( -a | -p ) venvname

py-venv -d

py-venv -i venvname python_version python_homedir python_venvroot

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

make Python virtual environment (venv) portable as good as possible without breaking the original mechanisms.

 

OPTIONS

-h
usage message.

-V
print program version.

-i venvname python_version python_homedir python_venvroot
re-configure the Python virtual environment (created using python3 -m venv python_venvroot) and define a name (venvname) to handle (activate, print) it.

This step adjusts the settings in python_venvroot/pyvenv.cfg to the current paths and versions.

If the Python virtual environment is installed portable (on a removable device) use the -i ... option on the startup (in etc/wtshell.cfg).

-a venvname
activate the Python virtual environment venvname by setting the related environment variables.

-d
deactivate the previous activated virtual environment.

-l
list all configured virtual environments.

-p venvname
print properties of a configured virtual environment (venvname).

 

ENVIRONMENT

-

 

EXIT STATUS

0
always.

1
given venvname does not exist.

4
usage message displayed.

5
version message displayed.

 

FILES

var/cache/scripts/py-venv/venv_venvname.bat
configuration file holding the configuration to be applied.

python_venvroot/Scripts/python.exe
Python interpreter of virtual environment (created by: python3 -m venv python_venvroot).

 

EXAMPLES

1) update virtual environment configuration
The py-venv -i venvname ... command can be added to etc/wtshell.cfg to ensure that the venv configuration always matches to current drive letters or once on the command line to be able to enable the related venv using a venvname.

  py-venv -i general ^
    3.12.8 ^
    H:\bin\WinPython64-3.12.8.0-slim\python ^
    %WA2L_INSTALLDIR%\var\lib\py\venv

2) list handled virtual environments
  py-venv -l

3) activate handled virtual environment in wtshell
  py-venv -a general

4) deactivate active virtual environment in wtshell
  py-venv -d

 

SEE ALSO

wintoolsintro(1) wtshell(1m), pip(1), install-packages (https://packaging.python.org/en/latest/tutorials/installing-packages/), venv-creation (https://docs.python.org/library/venv.html), package-index (https://pypi.org/) pip-cheatsheet (https://wa2l-edrc.sourceforge.net/manuals/man1m/pkgdir.1m.html#lbAN), WinPython (https://winpython.github.io/)

 

NOTES

-

 

BUGS

-

 

AUTHOR

py-venv was developed by into WA2L/WinTools by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2026 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 13:39:01 GMT, January 31, 2026