【问题标题】:Flask - Elastic Beanstalk Deploy - requirements.txt non-zero exit statusFlask - Elastic Beanstalk Deploy - requirements.txt 非零退出状态
【发布时间】:2017-10-09 11:05:51
【问题描述】:

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

  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 的样子,其中包括许多依赖于其他包的包:

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

【问题讨论】:

    标签: python flask amazon-elastic-beanstalk


    【解决方案1】:

    通过确保我有 virtualenv -p python3 VENV 然后添加一个带有 .config 文件的 .ebextensions 文件夹以某种方式解决了这个问题:

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

    这里建议:https://stackoverflow.com/a/35168068/7982502

    【讨论】:

      猜你喜欢
      • 2020-10-10
      • 2019-08-06
      • 2015-04-30
      • 2022-06-21
      • 2019-10-08
      • 2017-05-18
      • 2013-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多