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 pipupgradeNo compatibility data collected yet for this library.
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.
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.
Use `pipupgrade` directly from your shell or integrate it into scripts using subprocess calls, rather than trying to `import pipupgrade` in Python code.
Test `pipupgrade` in your specific Python environment (especially newer ones) before relying on it for critical updates. Consider using it within isolated virtual environments.
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.
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`.
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.
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`.
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.
No dependency data recorded yet.