0

I have a python web app deploying on GCP App engine. The App engine installs required python packages from pip, and it can install pure python source codes according to https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27

But one of my third-party python library is C++ involved (available on anaconda), which is not available on pip. How to install it? Can conda be used on GCP app engine?

Thanks.

Long
  • 1
  • 1

1 Answers1

3

UPDATE: I believe you can now use Python 3 on App Engine Standard Environment without the restrictions on third party libraries.

In App Engine Standard Environment, "third party libraries must be implemented as pure Python code with no C extensions" as per the link you provided.

App Engine Flexible Environment does allow c extensions. I use pip in my dockerfile to add all packages in a requirements.txt file if that helps:

ADD requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
Nicholas
  • 131
  • 3
  • After pushing the docker image onto google container registry, I couldn't run `gcloud app deploy` anymore, it always give me error `ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error:` Should I add my Flask app into docker image? – Long Jul 18 '19 at 19:36
  • I use [Custom Runtimes](https://cloud.google.com/appengine/docs/flexible/custom-runtimes/quickstart) and adjust my app.yaml like in the quickstart. Have you deployed in this way? – Nicholas Jul 19 '19 at 02:36