python - Elastic Beanstalk is not installing requirements.txt file
问题描述
My current directory structure is like this,
/site
- .elasticbeanstalk
- static
- templates
- views
- application.py
- requirements.txt
To create my website I am using flask which I have installed. When I upload my project to Elastic Beanstalk I get the following error:
[Wed Aug 01 17:56:30.174032 2018] [:error] [pid 313] [remote 172.31.19.50:124] Traceback (most recent call last):
[Wed Aug 01 17:56:30.174051 2018] [:error] [pid 313] [remote 172.31.19.50:124] File "/opt/python/current/app/application.py", line 1, in <module>
[Wed Aug 01 17:56:30.174055 2018] [:error] [pid 313] [remote 172.31.19.50:124] from flask import Flask
[Wed Aug 01 17:56:30.174068 2018] [:error] [pid 313] [remote 172.31.19.50:124] ModuleNotFoundError: No module named 'flask'
My requirements.txt is in the root directory but for some reason flask is not being installed.
The contents of the requirements.txt file are:
click==6.7
Flask==1.0.2
itsdangerous==0.24
Jinja2==2.10
MarkupSafe==1.0
Werkzeug==0.14.1
Any suggestions?
解决方案
推荐阅读
- django - Django 管理员在新条目或模型更新时发送电子邮件
- python - Plotly.py 错误在堆积条形图上使用离散颜色数据和悬停文本中的 customdata
- google-apps-script - 某些设备上的 G 脚本性能/过载
- audit-logging - Spring Boot 应用程序中的审计日志跟踪请求/响应正文
- ios - TableView 单元格重复 Swift
- javascript - 如何在 Javascript 中创建搜索栏以检查项目是否与输入匹配?
- mysql - 使用 SQL 查找表空闲时间
- macos - 返回两个特殊字符之间的文本(竖线)
- azure - 如何获取 Azure DevOps Artifact 使用者的列表?
- r - 投资任何权重的 R LP