在AppEngine Python 3.7标准版中python3-saml安装失败

时间:2018-10-26 22:26:37

标签: python google-app-engine google-app-engine-python

我在AppEngine Python 3.7 Standard中有一个简单的设置,只有两个文件:requirements.txtapp.yaml

requirements.txt文件是:

Flask==1.0.2
python3-saml==1.4.1

app.yaml文件是:

runtime: python37
service: myservice

我运行gcloud app deploy时遇到以下错误:

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build f8eaa62c-0385-4c1a-9788-b7765313ae08 status: FAILURE.
Build error details: {"message": "`pip_download_wheels` had stderr output:\n  Failed building wheel for xmlsec\nERROR: Failed to build one or more wheels\n\nerror: `pip_download_wheels` returned code: 1", "code": 1, "type": "USER_ERROR"}.

关于如何解决此问题的任何想法?

谢谢。

Cloud Build日志中的相关部分:

Step #1 - "builder": Building wheels for collected packages: itsdangerous, xmlsec, MarkupSafe
Step #1 - "builder":   Running setup.py bdist_wheel for itsdangerous: started
Step #1 - "builder":   Running setup.py bdist_wheel for itsdangerous: finished with status 'done'
Step #1 - "builder":   Stored in directory: /tmp/tmpWitMY2/wheel
Step #1 - "builder":   Running setup.py bdist_wheel for xmlsec: started
Step #1 - "builder":   Running setup.py bdist_wheel for xmlsec: finished with status 'error'
Step #1 - "builder":   Complete output from command /env/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-wheel-o2h0m8_p/xmlsec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-229ft_of:
Step #1 - "builder":   running bdist_wheel
Step #1 - "builder":   running build
Step #1 - "builder":   running build_ext
Step #1 - "builder":   *********************************************************************************
Step #1 - "builder":   Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?
Step #1 - "builder":   *********************************************************************************
Step #1 - "builder":   
Step #1 - "builder":   ----------------------------------------
Step #1 - "builder":   Running setup.py clean for xmlsec
Step #1 - "builder":   Running setup.py bdist_wheel for MarkupSafe: started
Step #1 - "builder":   Running setup.py bdist_wheel for MarkupSafe: finished with status 'done'
Step #1 - "builder":   Stored in directory: /tmp/tmpWitMY2/wheel
Step #1 - "builder": Successfully built itsdangerous MarkupSafe
Step #1 - "builder": Failed to build xmlsec
Step #1 - "builder": 
Step #1 - "builder": INFO     `pip_download_wheels` had stderr output:
Step #1 - "builder":   Failed building wheel for xmlsec
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder": 
Step #1 - "builder": ERROR    error: `pip_download_wheels` returned code: 1
Step #1 - "builder": INFO     pip_download_wheels took 6 seconds
Step #1 - "builder": INFO     build process for FTL image took 9 seconds
Step #1 - "builder": INFO     full build took 9 seconds
Step #1 - "builder": ERROR    `pip_download_wheels` had stderr output:
Step #1 - "builder":   Failed building wheel for xmlsec
Step #1 - "builder": ERROR: Failed to build one or more wheels
Step #1 - "builder": 
Step #1 - "builder": error: `pip_download_wheels` returned code: 1
Finished Step #1 - "builder"

1 个答案:

答案 0 :(得分:1)

python3-saml软件包取决于xmlsec,这实际上是导致构建在此处失败的原因。 This package has pre-install dependencies on system-level libraries,因此此消息在日志中:

  

Could not find xmlsec1 config. Are libxmlsec1-dev and pkg-config installed?

无法在AppEngine Standard环境中安装这些系统级程序包,而是需要使用a custom runtime with AppEngine Flex或使用python3-saml的替代程序,这些程序不依赖于系统级程序包。