使用python 3.4的Elastic Beanstalk仍使用python 2.7 [英] Elastic Beanstalk with python 3.4 still using python 2.7

查看:134
本文介绍了使用python 3.4的Elastic Beanstalk仍使用python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在EB 3.4和Django上使用EB来启动一些环境,但是它一直失败,看起来使用pip install -r requirements.txt安装时发生了错误,这是Web控制台中的事件:

I just spin up some environment using EB with python 3.4 and Django but it keeps failing, looks like the error occurs when installing using pip install -r requirements.txt this are the events from the web console:

Time    Type    Details
2017-10-06 20:22:39 UTC-0600    WARN    Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 69 seconds ago and took 14 minutes.
2017-10-06 20:22:20 UTC-0600    ERROR   Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
2017-10-06 20:21:17 UTC-0600    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2017-10-06 20:21:17 UTC-0600    ERROR   [Instance: i-0b46caf0e3099458c] Command failed on instance. Return code: 1 Output: (TRUNCATED)...) 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. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2017-10-06 20:21:14 UTC-0600    ERROR   Your requirements.txt is invalid. Snapshot your logs for details.

我遵循了本教程: django-elastic -beanstalk-django 推荐答案

我遇到了完全相同的问题.这是我找到的解决方案:

I had an exact same problem. Here is the solution I found:

  1. 转到到您环境的配置
  2. 点击 实例
  3. 的conf按钮
  4. 服务器部分下,检查您的自定义AMI ID
  1. Go to your env's configuration
  2. Click the conf button of Instances
  3. Under Server section, check your Custom AMI ID

现在,请离开页面并转到 AWS EC2控制台页面

For now, leave the page and go to AWS EC2 Console page

  1. 启动实例
  2. 您现在将处于第1步:选择Amazon Machine Image(AMI)
  3. 多田!您将看到这些ami id,您可以从以下列表中进行选择:

  1. Press Launch Instance
  2. You will now be on Step 1: Choose an Amazon Machine Image (AMI)
  3. Tada! You will see these ami ids that you can choose from:

返回到 3号并填写自定义AMI ID ,请从 6号进行引用 (仅供参考,我使用的是amazon linux,但这取决于您自己决定)

Go back to no.3 and fill up the Custom AMI ID, refer from no.6 (FYI, I used amazon linux, but it is up to you to decide)

这篇关于使用python 3.4的Elastic Beanstalk仍使用python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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