mkdir myapp && cd myapp && python -m venv .venvA common project-start sequence.
Project-level setup patterns for Python virtual environments, pyproject.toml, editable installs, dev tools, and team onboarding.
Create a local environment and prepare a project for work.
mkdir myapp && cd myapp && python -m venv .venvA common project-start sequence.
.venv/
venv/
__pycache__/
*.pyc
You normally commit dependency files, not the environment directory itself.
python -m pip install black ruff pytestA typical local developer-tool bootstrap step.
Use modern Python project metadata and local installs with venv.
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "myapp"
version = "0.1.0"
dependencies = [
"requests>=2.31",
]
A starting point for modern packaging metadata and editable installs.
Install the current project into the venv in editable mode.
python -m pip install -e .Useful for app and library development using modern metadata.
python -m pip install -e ".[dev,test]"Useful when your project defines optional dependency groups for contributors.
Make local setup fast and consistent for teammates.
```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -r requirements.txt
```
A good onboarding pattern for repository documentation.
setup:
python -m venv .venv
. .venv/bin/activate && python -m pip install -U pip setuptools wheel
. .venv/bin/activate && python -m pip install -r requirements.txt
A small quality-of-life improvement that helps teams onboard quickly.
layout python python3
An optional workflow for automatic environment handling in supported shells.