Python
Python development commands for package management, virtual environments, testing, and script execution with pip and venv.
98 commands
Browse by Topic
Getting Started
Quick setup and installation
pip
Package installer
Poetry
Dependency management
uv
Fast package manager
venv
Virtual environments
pyenv
Version management
pipx
Tool installation
pytest
Testing framework
Ruff
Linter & formatter
mypy
Type checker
Install Python (macOS)
Install Python 3 using Homebrew on macOS
Check Python version
Display installed Python version
Create virtual environment
Create a new virtual environment named 'venv'
Activate virtual environment
Activate the virtual environment (Unix/macOS)
Install package
Install a package from PyPI.
Install specific version
Install a specific version of a package.
Install from requirements
Install all packages from requirements file.
Install editable
Install package in editable/development mode.
Upgrade package
Upgrade package to latest version.
Uninstall package
Remove a package without confirmation.
Freeze requirements
Export installed packages to requirements file.
List installed packages
Show all installed packages.
Show outdated packages
List packages with available updates.
Show package info
Display detailed package information.
Check dependencies
Verify installed packages have compatible dependencies.
Clear pip cache
Remove all cached package files.
Create new project
Create a new Python project with Poetry structure.
Initialize in existing project
Initialize Poetry in an existing directory.
Add dependency
Add a package to dependencies.
Add dev dependency
Add packages to development dependencies.
Add to group
Add packages to a specific dependency group.
Remove dependency
Remove a package from dependencies.
Install dependencies
Install project dependencies from lock file.
Install with sync
Install and remove packages not in lock file.
Update dependencies
Update all dependencies to latest allowed versions.
Lock dependencies
Generate/update lock file without installing.
Run command
Execute command in the virtual environment.
Show dependency tree
Display dependency tree visualization.
Build package
Build source and wheel distributions.
Publish to PyPI
Build and publish package to PyPI.
Create project
Create a new Python project with uv.
Add dependency
Add a package to the project.
Add dev dependency
Add packages as development dependencies.
Sync environment
Synchronize environment with lock file.
Lock dependencies
Generate or update the lock file.
Run command
Execute command in the project environment.
pip install (compatible)
Install package using pip-compatible interface.
pip sync requirements
Sync environment with requirements file.
Create venv
Create virtual environment (80x faster than venv).
Run tool (uvx)
Run a tool in temporary isolated environment.
Install tool
Install a CLI tool globally (like pipx).
Install Python
Install a Python version (replaces pyenv).
List Python versions
Show available Python versions.
Create venv
Create a virtual environment named 'venv'.
Create .venv
Create venv with hidden directory (IDE-friendly).
Activate (Linux/macOS)
Activate virtual environment on Unix systems.
Activate (Windows)
Activate virtual environment on Windows.
Activate (PowerShell)
Activate virtual environment in PowerShell.
Deactivate
Exit the virtual environment.
Create with system packages
Create venv with access to system packages.
Create and upgrade pip
Create venv with latest pip and setuptools.
List available versions
Show all available Python versions.
Install Python version
Install a specific Python version.
List installed versions
Show all installed Python versions.
Set global version
Set Python version for all shells.
Set local version
Set Python version for current directory.
Set shell version
Set Python version for current shell session.
Show current version
Display currently active Python version.
Uninstall version
Remove an installed Python version.
Rehash shims
Rebuild shims after installing packages with executables.
Install tool
Install a CLI tool in isolated environment.
Run without install
Run a tool without permanent installation.
List installed tools
Show all pipx-installed applications.
Upgrade tool
Upgrade a specific tool to latest version.
Upgrade all tools
Upgrade all pipx-installed tools.
Uninstall tool
Remove a pipx-installed tool.
Inject package
Add a package to an existing pipx environment.
Ensure PATH
Add pipx binary location to PATH.
Reinstall all
Reinstall all tools (after Python upgrade).
Run all tests
Run all tests in current directory.
Run with verbose
Run tests with verbose output.
Run specific file
Run tests in a specific file.
Run specific test
Run a specific test function.
Filter by name
Run tests matching name pattern.
Stop on first failure
Exit after first test failure.
Show print output
Don't capture stdout (show print statements).
Run with coverage
Generate coverage report with missing lines.
Run by marker
Run only tests with specific marker.
Debug on failure
Drop into debugger on test failure.
Show slowest tests
Show 10 slowest tests.
Check code
Lint all files in current directory.
Check and fix
Lint and auto-fix all safe issues.
Fix with unsafe
Apply all fixes including potentially unsafe ones.
Format code
Format all files (like Black).
Check formatting
Check if files are formatted without changing.
Watch mode
Re-lint on file changes.
Select rules
Check only specific rule categories.
Ignore rules
Ignore specific rules during check.
Add noqa comments
Add suppression comments for all violations.
Check file
Type check a single file.
Check directory
Type check all files in a directory.
Strict mode
Enable all strict type checking options.
Ignore missing imports
Suppress errors for untyped dependencies.
Disallow untyped defs
Error on functions without type annotations.
Show error codes
Display error codes for easier suppression.
Pretty output
Show errors with context and formatting.
Check specific version
Type check against specific Python version.
No incremental
Run fresh check without using cache.
Discussion
Loading comments...