AWS beantalk无法找到已安装的Django模块

时间:2018-10-26 03:46:17

标签: django amazon-web-services amazon-elastic-beanstalk

我正在尝试将Django应用程序部署到AWS beantalk,但是遇到了此错误。

from django.core.wsgi import get_wsgi_application
[Fri Oct 26 03:22:21.523128 2018] [:error] [pid 4511] [remote 127.0.0.1:2336] ModuleNotFoundError: No module named 'django'
[Fri Oct 26 03:22:22.526577 2018] [:error] [pid 4511] [remote 127.0.0.1:2336] mod_wsgi (pid=4511): Target WSGI script '/opt/python/current/app/adminsite/wsgi.py' cannot be loaded as Python module.

进一步查看显示django已成功安装的日志文件。

[2018-10-26T03:41:56.170Z] INFO  [6032]  - [Application update app-61bb-181025_214141@8/AppDeployStage0/AppDeployPreHook/03deploy.py] : Completed activity. Result:
  Requirement already satisfied: django==2.1.2 in /opt/python/run/venv/lib64/python3.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 1))
  Requirement already satisfied: psycopg2==2.7.5 in /opt/python/run/venv/lib64/python3.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 2))
  Requirement already satisfied: pytz==2018.6 in /opt/python/run/venv/lib/python3.6/site-packages (from -r /opt/python/ondeck/app/requirements.txt (line 3))

什么可能导致此问题?

0 个答案:

没有答案