Registry / devops / pipupgrade

pipupgrade

JSON →
library1.12.0pypypiunverified

pipupgrade is a command-line interface (CLI) tool for upgrading Python packages across various environments. It supports requirements.txt files and Pipfiles, leveraging semantic versioning to intelligently manage updates and prevent unintended breaking changes. The current version is 1.12.0, released in February 2022, indicating a maintenance-focused release cadence.

pip install pipupgrade
INSTALL
IMPORT
SIG · PIPUPGRADE
P
pipupgrade
devopspythonv1.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

To quickly check for outdated packages, use the `--check` flag. To upgrade all packages across detected pip environments, simply run `pipupgrade`. By default, it avoids major version upgrades to prevent breaking changes.

pipupgrade --check # This command checks for outdated packages without performing upgrades. pipupgrade # This command upgrades all detected outdated packages, avoiding major version bumps by default.
pipupgrade --version
Debug
Known issues
breakingUsing the `--latest` flag or specifying `--upgrade-type major` will force upgrades to the absolute latest version, which may introduce incompatible changes in your dependencies, as `pipupgrade`'s default behavior is to avoid major version bumps to prevent breaking changes.
fix
Review the output, especially packages highlighted in red, and use `--upgrade-type minor` or `--upgrade-type patch` for safer upgrades if you are concerned about breaking changes. Avoid `--latest` unless you've confirmed compatibility.
affects: <=1.12.0
gotcha`pipupgrade` is designed as a command-line utility and does not expose a public Python API for programmatic imports or use. Attempting to import it as a library will not work as expected.
fix
Use `pipupgrade` directly from your shell or integrate it into scripts using subprocess calls, rather than trying to `import pipupgrade` in Python code.
affects: <=1.12.0
gotchaWhile the project's GitHub README previously stated compatibility with Python 2.7+ and Python 3.4+, the last release was in early 2022. Newer Python versions (e.g., Python 3.9+) or recent `pip` changes might not be fully tested or supported, potentially leading to unexpected behavior.
fix
Test `pipupgrade` in your specific Python environment (especially newer ones) before relying on it for critical updates. Consider using it within isolated virtual environments.
affects: >=1.12.0
gotchaRunning `pipupgrade` directly in a global Python environment (outside a virtual environment) can lead to unintended modifications of system-wide packages. Although `pipupgrade` aims to discover multiple environments, it is best practice to activate the specific virtual environment you intend to manage before running the tool, or use `--pip-path` for explicit control.
fix
Always activate your virtual environment (e.g., `source venv/bin/activate`) before running `pipupgrade`, or use the `--pip-path` option to target a specific `pip` executable within a virtual environment.
affects: <=1.12.0
Errors
Common errors & fixes
pipupgrade: command not found
The `pipupgrade` command is not recognized by your system's shell, typically because the `pipupgrade` package is not installed or its installation directory is not included in your system's PATH environment variable.
fix
First, ensure `pipupgrade` is installed: `pip install pipupgrade`. If it's installed but still not found, you may need to manually add Python's script directory to your system's PATH. For Windows, check `C:\PythonXX\Scripts`; for Linux/macOS, it might be in `~/.local/bin` or `/usr/local/bin`.
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied
This error occurs when `pipupgrade` attempts to modify files in system-wide Python directories without the necessary administrative privileges.
fix
Run the command with elevated privileges using `sudo` (on Linux/macOS: `sudo pipupgrade`) or by opening your terminal/command prompt as an administrator (on Windows). Alternatively, use the `--user` flag (`pipupgrade --user`) to install packages in your user's local site-packages directory, which does not require elevated permissions. It is generally recommended to use Python virtual environments to avoid system-wide permission issues.
Error: no such option: --some-invalid-flag
You have used an invalid or misspelled command-line option (flag) with `pipupgrade`.
fix
Consult the `pipupgrade` documentation or run `pipupgrade --help` to see the list of available commands and options for your installed version of the tool. Common valid flags include `--project`, `--self`, `--check`, `--latest`, `--upgrade-type`.
You are using pip version X.X.X, however version Y.Y.Y is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
While not directly an error from `pipupgrade`, this warning often appears when `pipupgrade` (or `pip` itself) is run with an outdated version of the `pip` package manager. Although `pipupgrade` is a separate tool, it relies on `pip` for package operations.
fix
Upgrade your `pip` package manager using the suggested command: `python -m pip install --upgrade pip`. If you are using a specific Python version, use `python3 -m pip install --upgrade pip` or `py -m pip install --upgrade pip` on Windows.
Upgrade
Version history
1.12.0latest on PyPI · released Feb 16, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources
pipupgrade — pip install pipupgrade · libregistry