black electronics

Python Virtual Environment

Common commands for creating and activating a Python virtual environment during pentests.

Python-based tools often need conflicting versions of the same dependency. Running each tool inside its own virtual environment keeps those dependencies isolated from your system Python and from each other.

Terminal window
virtualenv venv # Create a virtual environment in the venv folder
source venv/bin/activate # Activate it (your prompt will show (venv) once active)
Useful LinksPentest PayloadsCheat Sheets