PPPU is a PowerShell 7+ script for updating pip and installed Python packages with optional virtual environment support, parallel upgrades, dependency health checks, and timestamped logging.
The repository currently ships a single script, PPPU.ps1, which is designed for Windows environments where Python is already installed or available inside a virtual environment.
The script can also check Python.org at runtime to compare your installed interpreter against the latest stable Python 3 release, while falling back to a configured version if the site is unavailable.
- Detects the Python interpreter to use.
- Optionally works inside a virtual environment.
- Can create the virtual environment if it does not exist.
- Upgrades
pipbefore checking packages. - Finds outdated packages with
pip list --outdated --format=json. - Updates packages in parallel with a configurable throttle limit.
- Runs
pip checkafter updates. - Optionally attempts automatic repair for common dependency conflicts.
- Writes a timestamped log file for every run.
- Windows
- PowerShell 7 or newer
- Python available on
PATH, or a virtual environment you want to target
Run the script from PowerShell:
.\PPPU.ps1Common examples:
.\PPPU.ps1 -UseVenv
.\PPPU.ps1 -UseVenv -VenvPath ".\.venv"
.\PPPU.ps1 -UseVenv -CreateVenvIfMissing
.\PPPU.ps1 -MaxParallel 4
.\PPPU.ps1 -AutoFixBrokenDeps
.\PPPU.ps1 -UseVenv -CreateVenvIfMissing -AutoFixBrokenDeps| Parameter | Description |
|---|---|
-UseVenv |
Use the Python interpreter from a virtual environment. |
-VenvPath |
Path to the virtual environment. Default: .\.venv |
-CreateVenvIfMissing |
Create the virtual environment when -UseVenv is set and the target does not exist. |
-MaxParallel |
Maximum number of package upgrades to run in parallel. Default: 4 |
-AutoFixBrokenDeps |
Attempt repairs when pip check reports broken dependencies. |
-RecommendedPython |
Fallback version string used when the online Python.org lookup is skipped or unavailable. Default: 3.14 |
-SkipOnlinePythonRecommendation |
Disable the live Python.org lookup and use only the configured fallback version. |
-PythonDownloadsUrl |
Python.org downloads page used for the live version check. Default: https://www.python.org/downloads/ |
-LogDirectory |
Directory where timestamped logs are written. Default: .\logs |
- The script upgrades packages in the selected interpreter, so using a virtual environment is recommended when you want to limit impact.
- By default, the recommendation check tries to detect the latest stable Python 3 version from Python.org and falls back to
-RecommendedPythonif the lookup fails. - PowerShell 7 is required because the updater uses
ForEach-Object -Parallel. - The script pauses at the end with
Read-Host "Press Enter to exit"so it is friendly to double-click or manual terminal runs. - The header comments in the script still show
pip-updater.ps1in some examples, but the file in this repository is namedPPPU.ps1.
Each run creates a log file in the configured log directory using this format:
logs\pip-updater_yyyy-MM-dd_HH-mm-ss.log
The log captures step-by-step execution, package updates, warnings, and errors.
Package upgrades can introduce breaking changes, especially in shared or system-wide Python installations. If you are updating project dependencies, run PPPU inside that project's virtual environment whenever possible.