使用python 3.4的Elastic Beanstalk仍使用python 2.7 [英] Elastic Beanstalk with python 3.4 still using 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: 现在,请离开页面并转到 AWS EC2控制台页面 For now, leave the page and go to AWS EC2 Console page 多田!您将看到这些ami id,您可以从以下列表中进行选择:
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屋!