Hi ,
Facing a problem while deploying django to beanstalk with python 3.4 .
Beanstalk env and instance all been setup with pipeline yml.
But according to EB cli , can't find a way to install django.
Requirement.txt included in documents but can't be imported.Because there's no django module. So the http server can't been connect.
Here's the error log description , hope this may help
[ImportError: No module named 'django'
mod_wsgi : Target WSGI script '/opt/python/current/app/ebdjango/ebdjango/wsgi.py' cannot be loaded as Python module.
mod_wsgi : Exception occurred processing WSGI script '/opt/python/current/app/ebdjango/ebdjango/wsgi.py'.
Traceback (most recent call last):
File "/opt/python/current/app/ebdjango/ebdjango/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named 'django'
Thanks for your watching and teaching.
Hi @hiprprogrammer,
There are couple of reasons this can fail.
Make sure your wsgi module python version is correct.
You can manually try to install it using
pip3 install Django
and then to confirm its installation try
pip freeze
Let me know how it goes.
Thanks,
Lava
Hi @Lava Kumar Dukanam _Appfire_
Thanks for your assist,
we found out that it takes some steps to deploy on AWS beanstalk
First of all , add
- pip install django==1.11.16
in the pipeline.yml
and also add a requirement.txt undeer your repo root branches with the exact requirement you need so that pipeline will install it.
Django==1.11.16
pytz==2018.7
mysql-connector-python==8.0.6
Hope these may help who also meets the same problem.
Many thanks to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.