Skip to main content

🔧 Reqfix

Fix your Python dependency conflicts automatically.

Python License: MIT PyPI


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.txt with 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

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 reqfix is 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.toml and setup.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.

  1. Fork the repo
  2. Create a branch: git checkout -b feat/your-feature
  3. Make your changes
  4. 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

Metadata

Release files for reqfix 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reqfix 0.1.0
File Size Uploaded Provenance
reqfix-0.1.0.tar.gz 16.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for reqfix 0.1.0
File Interpreter ABI Platform
reqfix-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.3 kB

Release files / reqfix-0.1.0.tar.gz

Download URL reqfix-0.1.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7e9d575a7c7fa540796522baf5ada4e6a006738af9233c6e2a0e46b7ac8e34c0
BLAKE2b-256 checksum
How to use checksums
cb3e1e6f0ce492d7683d366d30446312a47deb32fcc7023ad3430dbbd47071e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / reqfix-0.1.0-py3-none-any.whl

Download URL reqfix-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ddef170bb45adfeb770d3656f4f14c1ff73f5993dfa1bad8749d0255a7fda91
BLAKE2b-256 checksum
How to use checksums
64acc53272b506b0741199f2e0d9ece7767841ac788b5336aab2a61559316157
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Security for reqfix 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page