Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic Beanstalk error - ImportError: No module named flask.ext.sqlalchemy

Tags:

I deployed my flask application into aws beanstalk and ran into an import error:

ImportError: No module named flask.ext.sqlalchemy

In my application.py file, I have this statement

from flask.ext.sqlalchemy import SQLAlchemy

and it runs fine on my machine but does not work in aws elastic beanstalk.

Anyone ran into a similar issue?

like image 568
Michael Avatar asked Aug 18 '13 00:08

Michael


1 Answers

Make sure you have included a requirements.txt file in root directory of your project.

The file should include any pip package that needs to be installed

Flask-SQLAlchemy=1.0

http://www.pip-installer.org/en/latest/cookbook.html#requirements-files

like image 108
Desmond Morris Avatar answered Oct 12 '22 14:10

Desmond Morris