我一直在尝试使用 ElasticBeanStalk 将我的烧瓶应用程序迁移到 AWS。迁移正常,但是站点给出 500 错误。网站的错误日志显示如下:
[Sat Dec 08 12:49:50.082687 2018] [:error] [pid 3996] [remote 37.37.41.199:176] mod_wsgi (pid=3996): Exception occurred processing WSGI script '/opt/python/current/app/application.py'.
[Sat Dec 08 12:49:50.082780 2018] [:error] [pid 3996] [remote 37.37.41.199:176] Traceback (most recent call last):
[Sat Dec 08 12:49:50.082805 2018] [:error] [pid 3996] [remote 37.37.41.199:176] File "/opt/python/current/app/application.py", line 10, in <module>
[Sat Dec 08 12:49:50.082808 2018] [:error] [pid 3996] [remote 37.37.41.199:176] from KoreD import app ##### Main Project Package ######
[Sat Dec 08 12:49:50.082814 2018] [:error] [pid 3996] [remote 37.37.41.199:176] File "/opt/python/current/app/KoreD/__init__.py", line 4, in <module>
[Sat Dec 08 12:49:50.082816 2018] [:error] [pid 3996] [remote 37.37.41.199:176] from flask import Flask
[Sat Dec 08 12:49:50.082830 2018] [:error] [pid 3996] [remote 37.37.41.199:176] ModuleNotFoundError: No module named 'flask'
但是,当我使用 SSH 登录 EC2 实例并导航到 virtualenv 并尝试安装烧瓶时,它显示烧瓶已安装。我已经研究它很长一段时间了,但它似乎没有通过。任何建议,将不胜感激。
我运行 which flask 和 which python 命令来确定路径和结果如下:
是否有可能是路径问题,如果有,如何解决?
慕桂英3389331
相关分类