Fix your Python dependency conflicts automatically
Project description
๐ง Reqfix
Fix your Python dependency conflicts automatically.
The Problem
You clone a Python project, create a virtual environment, run pip install -r requirements.txt and get this:
ERROR: Cannot install flask==1.0.0 and werkzeug==2.3.0 because these
package versions have conflicting dependencies.
Then you spend the next hour manually hunting for compatible versions. It's tedious, frustrating, and happens to every developer.
The Solution
Reqfix analyzes your requirements.txt, talks to PyPI, finds compatible versions for every package, verifies they all work together, and installs them.
reqfix install
That's it.
โจ Features
- ๐ Analyze โ Detects conflicts, unpinned packages, and outdated versions
- ๐ง Fix โ Generates a clean
requirements.fixed.txtwith pinned compatible versions - ๐ Install โ Auto-installs all fixed packages in one command
- ๐ก๏ธ Verify โ Cross-checks ALL packages are mutually compatible before installing anything
- ๐จ Beautiful output โ Color-coded terminal reports powered by Rich
๐ฆ Installation
Option 1 โ Via pip (recommended)
pip install reqfix
Option 2 โ From source (for contributors)
git clone https://github.com/Sakshi-512/reqfix.git
cd reqfix
pip install -e .
๐ก Install globally (outside any virtualenv) so
reqfixis available in every project.
๐ Usage
The most common flow
# You cloned a project and pip install failed?
# Just run:
reqfix install
Analyze โ see what's broken (no changes made)
reqfix analyze
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Reqfix โ Python Dependency Doctor โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Found 4 packages in requirements.txt
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Package โ Original โ Status โ Suggested Fix โ Reason โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ flask โ >=2.0.0 โ โ
Healthy โ flask==3.1.2 โ Pinned to latest compatible version โ
โ requests โ ==2.28.1 โ โ
Healthy โ requests==2.28.1 โ Pinned to latest compatible version โ
โ numpy โ none โ ๐ Unpinned โ numpy==2.4.2 โ Pinned to latest stable โ
โ pandas โ >=1.3.0 โ โ
Healthy โ pandas==3.0.0 โ Pinned to latest compatible version โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฅ Conflicts: 0 ๐ Unpinned: 1 โ
Healthy: 3
โ
All packages verified โ no cross-package conflicts.
Fix โ generate a clean requirements file
reqfix fix
Writes a requirements.fixed.txt with every package pinned to a compatible version. Nothing is installed.
Install โ fix and install in one step
reqfix install
Asks for confirmation, verifies cross-package compatibility, then installs everything.
Custom file paths
reqfix analyze --file path/to/requirements.txt
reqfix fix --output my-fixed-requirements.txt
๐บ๏ธ Roadmap
This is just the beginning. Here's what's coming:
- v0.2 โ Parallel PyPI requests (faster analysis)
- v0.3 โ Support for
pyproject.tomlandsetup.py - v0.4 โ Conflict graph visualization
- v1.0 โ SaaS web app with team features
- v1.x โ VS Code extension with inline conflict highlighting
๐ค Contributing
Contributions are welcome! This project is actively developed.
- Fork the repo
- Create a branch:
git checkout -b feat/your-feature - Make your changes
- Push and open a Pull Request
Please follow the existing code style โ type hints, docstrings, and single-responsibility functions throughout.
๐ Project Structure
reqfix/
โโโ core/
โ โโโ parser.py # Parses requirements.txt into objects
โ โโโ resolver.py # Fetches versions from PyPI, detects conflicts
โ โโโ fixer.py # Determines best version for each package
โ โโโ verifier.py # Verifies all packages are mutually compatible
โ โโโ installer.py # Writes fixed file and runs pip install
โโโ cli/
โ โโโ main.py # Terminal interface (analyze, fix, install)
โโโ setup.py # Package configuration
โโโ requirements.txt # Reqfix's own dependencies
๐ License
MIT โ free to use, modify, and distribute.
Built with โค๏ธ to save developers from dependency hell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reqfix-0.1.0.tar.gz.
File metadata
- Download URL: reqfix-0.1.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e9d575a7c7fa540796522baf5ada4e6a006738af9233c6e2a0e46b7ac8e34c0
|
|
| MD5 |
08839a1e4f352b49fe65775935e1f484
|
|
| BLAKE2b-256 |
cb3e1e6f0ce492d7683d366d30446312a47deb32fcc7023ad3430dbbd47071e2
|
File details
Details for the file reqfix-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reqfix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ddef170bb45adfeb770d3656f4f14c1ff73f5993dfa1bad8749d0255a7fda91
|
|
| MD5 |
c74366badba459109cebec070ca521e3
|
|
| BLAKE2b-256 |
64acc53272b506b0741199f2e0d9ece7767841ac788b5336aab2a61559316157
|