Unable to install pandas in gcloud python functions

1,917 views
Skip to first unread message

Alexander Whatley

unread,
Dec 8, 2018, 2:11:32 PM12/8/18
to Google Cloud Developers

I'm trying to deploy a gcloud function that requires the pandas library in python. My requirements.txt file is below:

firebase-admin==2.14.0
Flask==1.0.2
Flask-Mail==0.9.1
numpy==1.15.1
pandas==0.19.2

When I run the deploy command (gcloud functions deploy export --runtime python37 --trigger-http --project ....), I get the error message:
Deploying function (may take a while - up to 2 minutes)...failed.              
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: {"message": "`pip_download_wheels` had stderr output:\n  Failed building wheel for pandas\nERROR: Failed to build one or more wheels\n\nerror: `pip_download_wheels` returned code: 1", "code": 1, "type": "USER_ERROR"}

Is there a fix/workaround available?

Alexander Whatley

unread,
Dec 10, 2018, 6:08:35 PM12/10/18
to Google Cloud Developers
Just for anyone else who runs into this problem in the future, I fixed this by removing the version number for pandas. 
Reply all
Reply to author
Forward
0 new messages