pip-upgrader

raw JSON →
2.4.4 verified Mon Apr 27 auth: no python

An interactive pip requirements upgrader that updates version pins in requirements.txt files. Current version 2.4.4, requires Python >=3.10. Release cadence is irregular, with updates focused on bug fixes and minor features.

pip install pip-upgrader
error ModuleNotFoundError: No module named 'pip_upgrader'
cause The package is installed but not importable because it uses a namespace package. Use the correct import path.
fix
Use from pip_upgrader import pip_upgrader instead of import pip_upgrader.
error TypeError: pip_upgrader() got an unexpected keyword argument 'non_interactive'
cause In v2.4.2+, the non-interactive mode is enabled via command-line arguments, not keyword arguments.
fix
Pass arguments as strings: pip_upgrader('--non-interactive', '-p', 'all').
breaking In v2.4.0, the CLI entry point changed from `pip-upgrade` to `pip-upgrade` (same name but under pip_upgrader package). Ensure you're using the correct command.
fix Use `pip-upgrade` from terminal, or run `python -m pip_upgrader` as fallback.
gotcha The tool modifies requirements.txt in place. Ensure you have a backup or version control before running.
fix Commit or copy requirements.txt before running pip-upgrader.
gotcha Non-interactive mode with `-p all` updates all packages to latest, which may break compatibility. Use with caution.
fix Use `-p some` to limit upgrades, or manually review changes.

Run pip-upgrader from Python code or from CLI with `pip-upgrade`

from pip_upgrader import pip_upgrader

# Upgrade all packages interactively
pip_upgrader()

# Upgrade all packages non-interactively (auto-select latest)
pip_upgrader('--non-interactive', '-p', 'all')