我有一个Flask应用程序,正在尝试在AWS EC2实例上进行部署。
我的目录/ var / www / html / flaskapp /包含以下文件:
app.py 代码-我正在使用Dash Framework which uses Flask。
# Declaration
app = dash.Dash(__name__)
server = app.server
flaskapp.wsgi 代码
import sys
sys.path.insert(0, '/var/www/html/flaskapp')
from flaskapp import app as application
当我尝试加载应用程序时,出现以下错误:
File "/var/www/html/flaskapp/flaskapp.wsgi", line 1, in <module>
[Mon Oct 22 21:37:34.496074 2018] [wsgi:error] [pid 8490:tid 140020940171008]
[client 50.204.132.195:33695] from flaskapp import app as application
[Mon Oct 22 21:37:34.496090 2018] [wsgi:error] [pid 8490:tid 140020940171008]
[client 50.204.132.195:33695] ImportError: No module named flaskapp