What versions of Python packages are supported in Google Cloud Functions?

Viewed 139

I'm trying out Google Cloud Functions for the first time, and I am using the Python 3.7 runtime. I would like to install package PyYAML so I added this to requirements.txt

PyYAML==3.12

Deployment failed with error:

Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "pip_download_wheels had stderr output:\n Failed building wheel for pyyaml\nERROR: Failed to build one or more wheels\n\nerror: pip_download_wheels returned code: 1", "errorType": "InternalError", "errorId": "44FA08B0"}}

That error isn't very helpful. Through trial and error I discovered that if I remove the "==3.12" stipulation:

PyYAML

then the deployment succeeds.

I'm interested to know:
* Is there a stated policy of which versions of packages are supported in Google Cloud Functions?
* How can i discover which versions of a particular package (PyYAML in this case) are supported in Google Cloud Functions?

(I'm using 3.12 because that's what a solution that we have internally is using - I can use a later version, and will do so, but I'm interested in answers to the above)

1 Answers

I don't think this could be a problem related to GCF. Usually, it should be a problem with Python3.7.

3.13 (2018-07-05)

Rebuild wheels using latest Cython for Python 3.7 support.

As you can see the change log of PyYAML. I think it just doesn't support Python 3.7 before 3.13 version.

Related