Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google function Build failed: found incompatible dependencies (Python)

I have a python 3.8 code deployed with google cloud functions and everything was working smoothly until today, but I made few updates to the code and re-deployed my function. Since then I'm getting the below error.

Deployment failure: Build failed: found incompatible dependencies: "functions-framework 2.1.2 has requirement click<8.0,>=7.0, but you have click 8.0.0."; Error ID: 945b0f01

I also tried to re-deploy the existing the code which was deployed successfully a week ago, but I was still getting the above error. It would be great if anyone can share their thoughts on this error.

Below is my requirements.txt file

pandas >= 1.1.5 
fsspec >= 2021.04.0
gcsfs >= 2021.04.0
requests >= 2.23.0
alpaca-trade-api >= 0.51
datapackage >= 1.15
statsmodels >= 0.12.1
sendgrid
like image 973
Rohit Avatar asked May 12 '21 19:05

Rohit


1 Answers

Simply include in your requirements.txt the version functions-framework==2.1.2. It looks like during deploy gcp requires this module and by default is going to use the latest version (functions-framework 2.1.3). Thus the incompatibility of versions. I had several cloud functions that I could deploy partly because of this error...among 7 cloud functions 3 would not deploy because of the missing functions-framework 2.1.2 in the requirements.txt

like image 177
linuxLover Avatar answered Nov 13 '22 01:11

linuxLover