generative-ai-python icon indicating copy to clipboard operation
generative-ai-python copied to clipboard

Can't install latest grpc with generative-ai-python

Open tebeka opened this issue 1 year ago • 0 comments

Description of the feature request:

I'd like to bump the dependency of google-ai-generativelanguage so it'll use later grpc and protobuf versions.

What problem are you trying to solve with this feature?

I have the following dependencies:

grpcio ~= 1.65
grpcio-reflection ~= 1.65
google-generativeai ~= 0.7

Pip can't install due to:

ERROR: Cannot install google-generativeai and runner because these package versions have conflicting dependencies.

The conflict is caused by:
    google-generativeai 0.7.0 depends on protobuf
    google-ai-generativelanguage 0.6.5 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, <5.0.0dev and >=3.19.5
    grpcio-reflection 1.65.4 depends on protobuf<6.0dev and >=5.26.1
    google-generativeai 0.7.0 depends on protobuf
    google-ai-generativelanguage 0.6.5 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, <5.0.0dev and >=3.19.5
    grpcio-reflection 1.65.2 depends on protobuf<6.0dev and >=5.26.1
    google-generativeai 0.7.0 depends on protobuf
    google-ai-generativelanguage 0.6.5 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, <5.0.0dev and >=3.19.5
    grpcio-reflection 1.65.1 depends on protobuf<6.0dev and >=5.26.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

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

Any other information you'd like to share?

I see that https://github.com/googleapis/google-cloud-python/blob/main/packages/google-ai-generativelanguage/setup.py has newer version as dependencies.

tebeka avatar Aug 11 '24 08:08 tebeka