Devr.AI icon indicating copy to clipboard operation
Devr.AI copied to clipboard

BUG:Dependency conflict with protobuf in requirements.txt poetry.lock is not synced with pyproject.toml

Open mithun50 opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

What happened?

📌 Issue Overview

While installing dependencies from requirements.txt, a major dependency conflict related to protobuf versions is occurring. The following packages are causing incompatible requirements:

  • google-ai-generativelanguage==0.6.18 ⤷ Requires protobuf>=3.20.2, <7.0.0 but excludes versions 4.21.0 to 4.21.5.

  • google-api-core==2.25.1 ⤷ Requires protobuf>=3.19.5, <7.0.0.

  • googleapis-common-protos==1.70.0 ⤷ Requires protobuf>=3.20.2, <7.0.0 but excludes 4.21.0 to 4.21.5.

  • grpcio*==1.73.0 ⤷ Requires protobuf>=6.30.0, <7.0.0.

  • onnxruntime==1.22.0 ⤷ Requires protobuf<6.0, >=3.0.0.

  • opentelemetry-proto==1.33.0 ⤷ Requires protobuf<6.0, >=5.0.

  • protobuf==6.31.1 is currently specified and seems incompatible with multiple packages.

Also poetry.lock is not synced with pyproject.toml

🔍 Steps to Reproduce

  1. Clone or open the project that includes the requirements.txt.

  2. Run the following command in your terminal or Replit shell:

pip install -r requirements.txt
  1. Observe the dependency resolution errors during installation.

🎯 Expected Behavior

All dependencies in requirements.txt should be installable without version conflicts.

pip install -r requirements.txt should complete successfully.

🚨 Actual Behavior

The conflict is caused by:
    The user requested protobuf==6.31.1
    google-ai-generativelanguage 0.6.18 depends on protobuf!=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <7.0.0 and >=3.20.2
    google-api-core 2.25.1 depends on protobuf!=3.20.0, !=3.20.1, !=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <7.0.0 and >=3.19.5
    googleapis-common-protos 1.70.0 depends on protobuf!=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <7.0.0 and >=3.20.2
    grpcio-health-checking 1.73.0 depends on protobuf<7.0.0 and >=6.30.0
    grpcio-status 1.73.0 depends on protobuf<7.0.0 and >=6.30.0
    grpcio-tools 1.73.0 depends on protobuf<7.0.0 and >=6.30.0
    onnxruntime 1.22.0 depends on protobuf
    opentelemetry-proto 1.33.0 depends on protobuf<6.0 and >=5.0

Record

  • [x] I agree to follow this project's Code of Conduct
  • [x] I want to work on this issue

mithun50 avatar Aug 04 '25 15:08 mithun50

hey @mithun50, Thanks for raising this issue. You can surely work on this; We preferred to use poetry instead of the requirements.txt, which might have resulted in this. Simply activating the poetry environment and pip freeze will work. Make sure to use the poetry way as this will ensure all dependencies to be updated.

smokeyScraper avatar Aug 04 '25 18:08 smokeyScraper

Fixed #121

mithun50 avatar Aug 05 '25 11:08 mithun50