Flask-Elastic Beanstalk Deploy-Requirements.txt非零退出状态 [英] Flask - Elastic Beanstalk Deploy - requirements.txt non-zero exit status

查看:56
本文介绍了Flask-Elastic Beanstalk Deploy-Requirements.txt非零退出状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够在本地运行使用AWS作为其数据库的Web应用程序,但是每次部署我最终都会遇到以下错误.我正在使用Python 3(根据AWS要求为3.4):

I'm able to run this web app locally that uses AWS for its db, but every deploy I end up getting the following error. I'm using Python 3 (3.4 per AWS requirements):

  2017-05-10 04:18:47,980 ERROR    Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1   Traceback (most recent call last):
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
      install_dependencies()
    File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
      check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
    File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call
      raise CalledProcessError(retcode, cmd)   CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (Executor::NonZeroExitStatus)

这是我的requirements.txt的样子,其中包括很多依赖于其他人的软件包:

Here's what my requirements.txt looks like, which includes a lot of packages that are dependent upon others:

appdirs==1.4.3
asn1crypto==0.22.0
cffi==1.10.0
click==6.7
cryptography==1.8.1
enum34==1.1.6
Flask==0.12.1
Flask-GoogleMaps==0.2.4
Flask-MySQL==1.4.0
idna==2.5
image==1.5.5
ipaddress==1.0.18
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
olefile==0.44
packaging==16.8
Pillow==4.1.1
pycparser==2.17
PyMySQL==0.7.11
pyOpenSSL==17.0.0
pyparsing==2.2.0
six==1.10.0
Werkzeug==0.12.1

推荐答案

以某种方式解决了这一问题,方法是确保我拥有 virtualenv -p python3 VENV ,然后添加一个.ebextensions文件夹以及一个包含以下内容的.config文件:

Somehow solved this by ensuring I had virtualenv -p python3 VENV and then adding an .ebextensions folder with a .config file containing:

packages:
    yum:
        libjpeg-turbo-devel: [] 

如此处建议的那样: https://stackoverflow.com/a/35168068/7982502

这篇关于Flask-Elastic Beanstalk Deploy-Requirements.txt非零退出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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