Google AppEngine Python 3.7上的自定义库 [英] Custom libraries on Google AppEngine Python 3.7

查看:75
本文介绍了Google AppEngine Python 3.7上的自定义库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在需要一组库作为依赖项的Google AppEngine Python 3.7标准环境上部署服务.无法部署依赖项之一(GDAL 2.2.2),并返回错误消息:

I'm trying to deploy a service on Google AppEngine Python 3.7 standard environment, which requires a set of libraries as dependencies. One of the dependencies (GDAL 2.2.2) cannot be deployed returning error message:

File upload done.
Updating service [pycloud-wms]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 04c3dcfd- 
230d-44ad-981a-8819a5f60130 status: FAILURE.
Error ID: 9E195939.
Error type: InternalError.
Error message: `pip_download_wheels` had stderr output:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-wheel-p30r4tj3/gdal/
error: `pip_download_wheels` returned code: 1.

我想知道此错误的原因,以及是否有人知道在GAE上解决此问题的方法.

I'm wondering about the reason for this error and also if anyone knows a way of solving this problem on GAE.

注意:我知道我可以使用容器在GAE Flexible环境中部署我的应用程序,但是两种方法之间的价格差异非常大.

NOTE: I know I can deploy my application using GAE Flexible environment using a container, but the price difference between both approaches is quite substantial.

推荐答案

The dependencies in the Google App Engine Python3.7 runtime are installed using the Python package manager pip.

要在GAE标准Python3.7运行时中安装Python软件包,需要将其作为pip可安装的Python库提供.

To install a Python package in the GAE Standard Python3.7 runtime it needs to be offered as a pip-installable Python library.

GDAL软件包可通过 pip 安装.要安装的 libgdal gdal-devel 平台程序包,它们不在App Engine Standard Python3.7运行时的基本运行时中.

The GDAL package is installable via pip, but it requires the libgdal and gdal-devel platform packages to be installed, which don't come in the base runtime for App Engine Standard Python3.7 runtime.

解决方案是使用GAE Flex环境并首先安装这些平台级别的依赖项.

The solution is to use the GAE Flex environment and install these platform-level dependencies first.

这篇关于Google AppEngine Python 3.7上的自定义库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆