Develop Python 3 applications.
| Options Id | Description | Type | Default Value |
|---|---|---|---|
| imageVariant | Python version (use -trixie, -bookworm, or -bullseye variants on local arm64/Apple Silicon): | string | 3.13-trixie |
This template references an image that was pre-built to automatically include needed devcontainer.json metadata.
- Image: mcr.microsoft.com/devcontainers/python (source)
- Applies devcontainer.json contents from image: Yes (source)
This container installs all Python development utilities using pipx to avoid impacting the global Python environment. You can use this same utility add additional utilities in an isolated environment. For example:
pipx install prospectorSee the pipx documentation for additional information.
Note: This file was auto-generated from the devcontainer-template.json. Add additional notes to a NOTES.md.
This template can also be run manually using Docker, without VS Code.
- Install Docker.
- Install Visual Studio Code.
- Install the Dev Containers extension.
- Open this folder in VS Code.
- When prompted, select "Reopen in Container".
VS Code will automatically:
- Pull the image
mcr.microsoft.com/devcontainers/python - Build the environment
- Install dependencies (if any) from
requirements.txt
You can also launch the container directly using Docker:
docker run -it -p 9000:9000 mcr.microsoft.com/devcontainers/python