ImportError: No module named django.core.handlers.wsgi in install django mod_wsgi config on apache

前端 未结 10 960
我寻月下人不归
我寻月下人不归 2021-02-06 22:34

I tried to install django to work with apache and mod_wsgi but get this error:

ImportError: No module named django.core.handlers.wsgi,

I\'v rea

10条回答
  •  -上瘾入骨i
    2021-02-06 23:36

    I solved the problem by adding location of site-packages, where I have kept django subdirectory (/Library/python/2.7/site-packages) to WSGIDaemonProcess:

    WSGIDaemonProcess www.example.com processes=2 threads=15 display-name=%{GROUP} 
        python-path=/Library/python/2.7/site-packages
    

    If you are using embedded server mode use in httpd.conf:

    WSGIPythonPath /Library/python/2.7/site-packages
    

提交回复
热议问题