我正在关注 AWS Elastic Beanstalk 的烧瓶教程 http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html部署示例应用程序。
虽然我收到错误您的requirements.txt无效- 全文如下。我对于这个错误,虽然我没有得到任何有用的解决方案。
My 要求.txt文件粘贴在下面的部分中。我正在使用Ubuntu 桌面版 16.04
由于您按照教程可能会成功部署,因此请分享。谢谢。
Error
ERROR: Your requirements.txt is invalid. Snapshot your logs for details.
ERROR: [Instance: i-c78c8f57] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 540, 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.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
WARN: Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 45 seconds ago and took 3 minutes.
ERROR: Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
要求.txt
click==6.6
Flask==0.11.1
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==0.23
pkg-resources==0.0.0
Werkzeug==0.11.10
我在本地进行了测试,并且能够复制您的问题。为了获取有关我使用的实例出现问题的更多信息eb logs
查看当前 EC2 实例上的日志。从那里我能够看到完整的堆栈eb-activity.log
Collecting pkg-resources==0.0.0 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r /opt/python/ondeck/app/requirements.txt (line 4)) (from versions: )
No matching distribution found for pkg-resources==0.0.0 (from -r /opt/python/ondeck/app/requirements.txt (line 4))
我不确定在哪里pkg-resources=0.0.0
来自但它不是 pip 中的有效包。我能够删除该行并成功部署。
您可能想验证您的输出pip freeze
看看那个图书馆是否真的存在。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)