title: WSGIPath Error while Deploying Django App using AWS Elasticbeanstalk
body: <p>I am trying to deploy my Django Project on AWS using Elastic Beanstalks. I have tried multiple value changes for WSGIPath. 
  But Everytime, I am getting the same Error:</p>
  
  <p>while running 'eb create' from ubuntu terminal:</p>
  
  <p>Error Logs (from Eb logs):</p>
  
  <pre><code>-------------------------------------
  /var/log/httpd/error_log
  -------------------------------------
  mod_wsgi (pid=3005): Target WSGI script '/opt/python/current/app/myapp/wsgi.py' cannot be loaded as Python module.
  mod_wsgi (pid=3005): Exception occurred processing WSGI script '/opt/python/current/app/myapp/wsgi.py'.
  Traceback (most recent call last):
      File "/opt/python/current/app/myapp/wsgi.py", line 24, in &lt;module&gt;
      application = get_wsgi_application()
     File "/opt/python/run/venv/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
       django.setup()
     File "/opt/python/run/venv/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
  configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
     File "/opt/python/run/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__
       self._setup(name)
     File "/opt/python/run/venv/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup
  </code></pre>
  
  <p>Can someone please explain how this path is picked up and how this can be corrected ?</p>
  
  <p>My Project Structure:</p>
  
  <pre><code>.
  ├── .ebextensions
  │   ├── myapp.config
  ├── .elasticbeanstalk
  │   ├── config.yml
  ├── db.sqlite3
  ├── manage.py
  ├── media
  ├── abc
  │   ├── admin.py
  │   ├── apps.py
  │   ├── constants.py
  │   ├── __init__.py
  │   │   └── __init__.py
  │   ├── models.py
  │   ├── test1_form.py
  │   ├── tests.py
  │   ├── urls.py
  │   └── views.py
  ├── requirements.txt
  ├── static
  ├── templates
  └── myapp
      ├── constants.py
      ├── test1_form.py
      ├── __init__.py
      ├── registration_form.py
      ├── settings.py
      ├── urls.py
      ├── views.py
      └── wsgi.py
  </code></pre>
  
  <p>myapp.config File:</p>
  
  <pre><code>option_settings:
          "aws:elasticbeanstalk:container:python": 
          WSGIPath: "myapp/wsgi.py"
  </code></pre>
  
  <p>config.yml file</p>
  
  <pre><code>branch-defaults:
    master:
      environment: abc-dev
      group_suffix: null
  global:
    application_name: abc
    default_ec2_keyname: abc_eb_key
    default_platform: Python 2.7
    default_region: us-east-1
    profile: eb-cli
    sc: git
  </code></pre>
  
  <p>settings.py File:</p>
  
  <pre><code>WSGI_APPLICATION = 'myapp.wsgi.application'
  </code></pre>
  
  <p>myapp/wsgi.py file:</p>
  
  <pre><code>import os, sys, inspect
  
  from django.core.wsgi import get_wsgi_application
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myapp.settings")
  
  application = get_wsgi_application()
  </code></pre>