deploying my mac as a server

could you point me to the proper documentation to deploy using nginx+uwsgi
so i can try it


On Tue, Jun 28, 2016 at 4:49 PM, Avraham Serour <[email protected]> wrote:

> it seems it doesn't have cffi installed
>
> but why do you want to do this? are you using the mac as server of are you
> setting up your development environment?
>
> for development you may just use manage.py runserver, you don't need to
> setup apache
>
> for the server I recommend using nginx+uwsgi, the killer feature for nginx
> over apache is the simpler config file
>
>
> On Tue, Jun 28, 2016 at 5:43 PM, Coulson Kgathi <[email protected]> wrote:
>
>> I am getting an error trying to setup my django project on apache2 mac os
>> x, django 1.9, python 3
>>
>> my wsgi.py looks like this
>>
>> import os
>>
>> import sys
>>
>>
>> VIRTUALENV_PATH = '/Users/ckgathi/.virtualenvs/bcpp-interview/'
>>
>> SOURCE_ROOT_PATH = '/Users/ckgathi/source'
>>
>> LOCAL_PROJECT_RELPATH = 'bcpp-interview/'
>>
>>
>> # Activate the virtual env
>>
>> activate_env=os.path.join(VIRTUALENV_PATH,'bin/activate_this.py')
>>
>> # execfile(activate_env, dict(__file__=activate_env))
>>
>> file_p = '/Users/ckgathi/.virtualenvs/bcpp
>> -interview/bin/activate_this.py'
>>
>> exec(open(activate_env).read(), dict(__file__=activate_env))
>>
>> # Add the site-packages of the chosen virtualenv to work with
>>
>> # update path
>>
>> sys.path.insert(0, os.path.join(VIRTUALENV_PATH, 'local/lib
>> /python3.5/site-packages'))
>>
>> sys.path.insert(0, os.path.join(SOURCE_ROOT_PATH, LOCAL_PROJECT_RELPATH))
>>
>>
>> os.environ.setdefault("DJANGO_SETTINGS_MODULE", 'bcpp_interview.settings'
>> )
>>
>>
>> from django.core.wsgi import get_wsgi_application
>>
>> application = get_wsgi_application()
>>
>>
>> and its giving me error
>>
>>
>>
>>
>>
>>
>> [Tue Jun 28 16:41:40.781127 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]     mod = import_module(mod_path)
>>
>> [Tue Jun 28 16:41:40.781143 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]   File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
>> line 37, in import_module
>>
>> [Tue Jun 28 16:41:40.781205 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]     __import__(name)
>>
>> [Tue Jun 28 16:41:40.781218 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/edc_audio_recording/apps.py",
>> line 2, in <module>
>>
>> [Tue Jun 28 16:41:40.781265 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]     import sounddevice as sd
>>
>> [Tue Jun 28 16:41:40.781278 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/sounddevice.py",
>> line 34, in <module>
>>
>> [Tue Jun 28 16:41:40.781765 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]     _ffi = _FFI()
>>
>> [Tue Jun 28 16:41:40.781779 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/cffi/api.py",
>> line 56, in __init__
>>
>> [Tue Jun 28 16:41:40.781996 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0]     import _cffi_backend as backend
>>
>> [Tue Jun 28 16:41:40.782018 2016] [wsgi:error] [pid 3854] [remote
>> 127.0.0.1:0] ImportError: No module named _cffi_backend
>>
>> [Tue Jun 28 16:41:40.898298 2016] [wsgi:info] [pid 3853] mod_wsgi
>> (pid=3853): Create interpreter 'interview|'.
>>
>> [Tue Jun 28 16:41:40.900250 2016] [wsgi:info] [pid 3853] mod_wsgi
>> (pid=3853): Adding '/Users/ckgathi/bcpp-interview' to path.
>>
>> [Tue Jun 28 16:41:40.900503 2016] [wsgi:info] [pid 3853] mod_wsgi
>> (pid=3853): Adding
>> '/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages' to
>> path.
>>
>> [Tue Jun 28 16:41:40.904407 2016] [wsgi:info] [pid 3853] [remote
>> 127.0.0.1:0] mod_wsgi (pid=3853, process='interview',
>> application='interview|'): Loading WSGI script
>> '/Users/ckgathi/source/bcpp-interview/bcpp_interview/wsgi.py'.
>>
>> [Tue Jun 28 16:41:42.319143 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0] mod_wsgi (pid=3853): Target WSGI script
>> '/Users/ckgathi/source/bcpp-interview/bcpp_interview/wsgi.py' cannot be
>> loaded as Python module.
>>
>> [Tue Jun 28 16:41:42.319227 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0] mod_wsgi (pid=3853): Exception occurred processing WSGI
>> script '/Users/ckgathi/source/bcpp-interview/bcpp_interview/wsgi.py'.
>>
>> [Tue Jun 28 16:41:42.319258 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0] Traceback (most recent call last):
>>
>> [Tue Jun 28 16:41:42.319284 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/source/bcpp-interview/bcpp_interview/wsgi.py", line 21, in
>> <module>
>>
>> [Tue Jun 28 16:41:42.319363 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     application = get_wsgi_application()
>>
>> [Tue Jun 28 16:41:42.319379 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/django/core/wsgi.py",
>> line 13, in get_wsgi_application
>>
>> [Tue Jun 28 16:41:42.319432 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     django.setup()
>>
>> [Tue Jun 28 16:41:42.319446 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/django/__init__.py",
>> line 18, in setup
>>
>> [Tue Jun 28 16:41:42.319493 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     apps.populate(settings.INSTALLED_APPS)
>>
>> [Tue Jun 28 16:41:42.319510 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/django/apps/registry.py",
>> line 85, in populate
>>
>> [Tue Jun 28 16:41:42.319644 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     app_config = AppConfig.create(entry)
>>
>> [Tue Jun 28 16:41:42.319661 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/django/apps/config.py",
>> line 116, in create
>>
>> [Tue Jun 28 16:41:42.319750 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     mod = import_module(mod_path)
>>
>> [Tue Jun 28 16:41:42.319767 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
>> line 37, in import_module
>>
>> [Tue Jun 28 16:41:42.319829 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     __import__(name)
>>
>> [Tue Jun 28 16:41:42.319842 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/edc_audio_recording/apps.py",
>> line 2, in <module>
>>
>> [Tue Jun 28 16:41:42.319889 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     import sounddevice as sd
>>
>> [Tue Jun 28 16:41:42.319902 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/sounddevice.py",
>> line 34, in <module>
>>
>> [Tue Jun 28 16:41:42.320395 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     _ffi = _FFI()
>>
>> [Tue Jun 28 16:41:42.320409 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]   File
>> "/Users/ckgathi/.virtualenvs/bcpp-interview/lib/python3.5/site-packages/cffi/api.py",
>> line 56, in __init__
>>
>> [Tue Jun 28 16:41:42.320622 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0]     import _cffi_backend as backend
>>
>> [Tue Jun 28 16:41:42.320646 2016] [wsgi:error] [pid 3853] [remote
>> 127.0.0.1:0] ImportError: No module named _cffi_backend
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d1af2089-8cf5-4541-9096-735df2ec438b%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/d1af2089-8cf5-4541-9096-735df2ec438b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Qky7xzDD4V0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFWa6tKKuZkvAT5cBf%3DZziZNN3zbnBAEpjt9pGgzvQ1H%3DY-dAQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFWa6tKKuZkvAT5cBf%3DZziZNN3zbnBAEpjt9pGgzvQ1H%3DY-dAQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
c.t.kgathi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAECkibxSLZ97f2fVEphRxTAuS6QNhKyGBXe5PK36gYb3n4wCXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to