Python venv Command Builder – Create & Activate
NEWPython venv command builder: get the exact commands to create, activate, deactivate and delete a virtual environment on Windows, macOS and Linux, plus uv and conda.
Runs 100% in your browser — your input is never uploaded or stored on our servers.
Tool
Shell
- 1. Create
py -m venv .venv
- 2. Activate
.\.venv\Scripts\Activate.ps1
- 3. Upgrade pip
python -m pip install --upgrade pip
- 4. Install requirements
python -m pip install -r requirements.txt
- 5. Check
python -c "import sys; print(sys.prefix)"
- 6. Deactivate
deactivate
- 7. Delete
Remove-Item -Recurse -Force .venv
- If activation fails with "running scripts is disabled on this system", allow local scripts once: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser (or for this window only: Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process).
Quick Examples
Typical inputs and the results this tool produces.
Overview
This Python venv command builder writes the commands for a virtual environment for the shell you actually use. Activation is where most people get stuck: it is Scripts\activate.bat in cmd, Scripts\Activate.ps1 in PowerShell, bin/activate in bash and zsh, and bin/activate.fish in fish. Pick the shell and you get create, activate, upgrade pip, install requirements, check, deactivate and delete commands in order, each with its own Copy button.
The interpreter is chosen correctly per platform: the py launcher with a version (py -3.12) on Windows and python3 or python3.12 on macOS and Linux. Options cover the folder name, --system-site-packages and installing a requirements file. Switch to the uv or conda tab to get the equivalent commands for those tools, including uv venv --python and conda create -n.
Notes explain the usual errors, such as the PowerShell execution policy message and the missing python3-venv package on Debian and Ubuntu. Nothing is executed; the commands are generated in your browser.
Why use this tool?
- Right activate command for every shell
- Fixes the PowerShell "scripts disabled" error
- Pick a Python version the right way
- Same workflow for venv, uv and conda
- Copy each step or the whole setup
Features
Four shells
Windows cmd and PowerShell, bash/zsh on macOS and Linux, and fish.
Version selection
py -3.12 on Windows, python3.12 elsewhere, or uv venv --python 3.12 and conda python=3.12.
Full lifecycle
Create, activate, upgrade pip, install requirements, check, deactivate and delete.
uv and conda tabs
Equivalent commands for uv (with --seed) and conda (named environments).
Execution policy help
Shows the Set-ExecutionPolicy command PowerShell needs before Activate.ps1 can run.
Copy per step
Every command has its own Copy button, plus one for the whole setup.
How to Use
Choose the tool
Pick venv (built in), uv or conda.
Choose your shell
Select PowerShell, cmd, bash/zsh or fish.
Set the options
Enter the folder name, an optional Python version and a requirements file.
Run the steps
Copy the commands in order into your terminal.