简体   繁体   中英

Installing packages on Google App Engine using Anaconda?

This weekend I made a Flask app that uses a lot of ML packages like Pytorch. The models are all built, so we don't need anything crazy like Google Compute Engine. However, I still need these libraries installed. However, many of them like Pytorch are not supported with pip. I get errors like these when trying to deploy.

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 729275d4-8baa-480d-bc31-6e1fca2ccf2a status: FAILURE.
Build error details: {"message": "`pip_download_wheels` had stderr output:\n  Could not find a version that satisfies the requirement mkl-fft (from -r /dev/stdin (line 18)) (from versions: )\nNo matching distribution found for mkl-fft (from -r /dev/stdin (line 18))\n\nerror: `pip_download_wheels` returned code: 1", "code": 1, "type": "USER_ERROR"}.
Check the build log for errors: https://console.cloud.google.com/gcr/builds/729275d4-8baa-480d-bc31-6e1fca2ccf2a?project=392093192495.

Is there any way to install these on Google App Engine using Anaconda, instead of a requirements.txt file?

Here is the project if anyone is curious. If this is not possible, is there any other hosting service that will make this easy (and has some sort of free tier)?

To answer your question, there is no way to install packages on App Engine with an installer other than pip .

However, the problem here isn't that the mkl-fft project is incompatible with pip , it's that the project only publishes built distributions, and hasn't published a built distribution for Python 3.7, which is the version of Python that App Engine uses, and which wasn't available yet the last time the mkl-fft project was released.

I would file an issue on the project's issue tracker detailing your use case and asking the maintainers to release a Python 3.7-compatible distribution, if possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM