Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ pwd
- /Users/my_user/my_django_project
- $ ls -R
- ./MySite:
- __init__.py migration_settings.py urls.py
- local_settings.py settings.py wsgi.py
- ./app1:
- <blah> <blah> <blah>
- ./app2:
- <blah> <blah> <blah>
- ./app3:
- <blah> <blah> <blah>
- $ ./manage.py runserver --settings=MySite.local_settings 0.0.0.0:8000
- $ pwd
- /Users/my_user/my_django_project
- $ gunicorn -v
- gunicorn (version 19.7.1)
- $ DJANGO_SETTINGS_MODULE=MySite.local_settings gunicorn MySite.wsgi:application --log-file=-
- [2018-02-21 19:26:01 -0500] [9038] [INFO] Starting gunicorn 19.7.1
- [2018-02-21 19:26:01 -0500] [9038] [INFO] Listening at: http://127.0.0.1:8000 (9038)
- [2018-02-21 19:26:01 -0500] [9038] [INFO] Using worker: sync
- [2018-02-21 19:26:01 -0500] [9041] [INFO] Booting worker with pid: 9041
- [2018-02-21 19:26:01 -0500] [9041] [ERROR] Exception in worker process
- Traceback (most recent call last):
- File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
- worker.init_process()
- File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
- self.load_wsgi()
- File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
- self.wsgi = self.app.wsgi()
- File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
- self.callable = self.load()
- File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
- return self.load_wsgiapp()
- File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
- return util.import_app(self.app_uri)
- File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 352, in import_app
- __import__(module)
- File "/Users/my_user/my_django_project/MySite/wsgi.py", line 13, in <module>
- from django.core.wsgi import get_wsgi_application
- ImportError: No module named django.core.wsgi
- [2018-02-21 19:26:01 -0500] [9041] [INFO] Worker exiting (pid: 9041)
- [2018-02-21 19:26:01 -0500] [9038] [INFO] Shutting down: Master
- [2018-02-21 19:26:01 -0500] [9038] [INFO] Reason: Worker failed to boot.
- $ pip install django
- Requirement already satisfied: django in /Users/my_user/my_virtual_env/lib/python2.7/site-packages
- $ python
- Python 2.7.10 (default, Feb 7 2017, 00:08:15)
- [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import django
- >>> import django.core
- >>> import django.core.wsgi
- >>> from django.core.wsgi import get_wsgi_application
- >>>
Add Comment
Please, Sign In to add comment