Skip to content

Fix pydantic dependency conflict with llama-index-workflows#7

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-dependency-conflict
Draft

Fix pydantic dependency conflict with llama-index-workflows#7
Copilot wants to merge 3 commits intomainfrom
copilot/fix-dependency-conflict

Conversation

Copy link

Copilot AI commented Oct 22, 2025

Problem

PlanExe could not be installed with pip install .[gradio-ui] due to conflicting pydantic version requirements:

ERROR: Cannot install None, PlanExe, llama-index-core and planexe[gradio-ui]==2025.5.20 
because these package versions have conflicting dependencies.

The conflict is caused by:
    planexe 2025.5.20 depends on pydantic==2.10.4
    llama-index-workflows 1.3.0 depends on pydantic>=2.11.5

The root cause was that PlanExe pinned pydantic to exactly version 2.10.4, while llama-index-workflows (a transitive dependency of llama-index-core) requires pydantic >= 2.11.5. These constraints are mutually exclusive and prevented pip from resolving dependencies.

Solution

Updated pydantic version constraints in pyproject.toml to use version ranges that satisfy all dependencies:

  • Changed: pydantic==2.10.4pydantic>=2.11.5,<3.0.0
  • Changed: pydantic_core==2.27.2pydantic_core>=2.28.1

This new constraint satisfies all dependency requirements:

  • ✅ llama-index-workflows: pydantic>=2.11.5
  • ✅ llama-index-core: pydantic>=2.8.0
  • ✅ fastapi 0.115.6: pydantic<3.0.0 and >=1.7.4
  • ✅ gradio 5.16.0: pydantic>=2.0
  • ✅ banks 2.2.0: pydantic (any version)

Changes

Core Fix

  • pyproject.toml: Updated pydantic and pydantic_core constraints to use compatible version ranges

Verification & Documentation

  • verify_installation.py: Added pydantic version check to validate installations
  • verify_dependency_fix.py: New script to automatically verify dependency constraints are correct
  • DEPENDENCY_FIX.md: Updated with comprehensive documentation of both pillow and pydantic fixes
  • INSTALL.md: Added pydantic compatibility information

Testing

  • ✅ All 20 existing unit tests pass
  • ✅ CodeQL security scan: 0 alerts
  • ✅ GitHub Advisory Database: No vulnerabilities in pydantic 2.11.5+
  • ✅ Dependency verification script confirms all constraints are satisfied
  • ✅ Mathematical verification of version compatibility

Why Version Ranges?

Using pydantic>=2.11.5,<3.0.0 instead of pinning to an exact version provides:

  • Flexibility: Allows pip to choose any compatible version within the range
  • Future compatibility: Automatically benefits from bug fixes and minor updates
  • Better resolution: Makes it easier for pip to find solutions that satisfy all dependencies
  • Standard practice: Follows Python packaging best practices

Impact

Users can now successfully install PlanExe with pip install .[gradio-ui] without dependency conflicts. The installation process is smooth and reliable, and the package remains compatible with the broader Python ecosystem.

Original prompt

ERROR: Cannot install None, PlanExe, llama-index-core and planexe[gradio-ui]==2025.5.20 because these package versions have conflicting dependencies.

The conflict is caused by:
planexe 2025.5.20 depends on pydantic==2.10.4
planexe[gradio-ui] 2025.5.20 depends on pydantic==2.10.4
fastapi 0.115.6 depends on pydantic!=1.8, !=1.8.1, !=2.0.0, !=2.0.1, !=2.1.0, <3.0.0 and >=1.7.4
gradio 5.16.0 depends on pydantic>=2.0
llama-index-core 0.13.0 depends on pydantic>=2.8.0
banks 2.2.0 depends on pydantic
llama-index-workflows 1.3.0 depends on pydantic>=2.11.5
llama-index-workflows 1.2.0 depends on pydantic>=2.11.5
llama-index-workflows 1.1.0 depends on pydantic>=2.11.5
llama-index-workflows 1.0.1 depends on pydantic>=2.11.5

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

(venv) D:\Work\repo\PlanExe>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 22, 2025 20:36
Co-authored-by: RazvanBd <26252162+RazvanBd@users.noreply.github.com>
Co-authored-by: RazvanBd <26252162+RazvanBd@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix dependency conflict in package installation Fix pydantic dependency conflict with llama-index-workflows Oct 22, 2025
Copilot AI requested a review from RazvanBd October 22, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants