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

前端 未结 10 958
我寻月下人不归
我寻月下人不归 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
    闹比i (楼主)
    2021-02-06 23:25

    Why are you even trying to add the site-packages directory into sys.path? If your mod_wsgi is compiled against Python 2.4, then it should already be looking in the site-packages directory. Sounds like your mod_wsgi isn't even compiled against Python 2.4.

    Run:

    ldd mod_wsgi.so
    

    against your installed mod_wsgi.so file to work out what Python version it is compiled for and post the result.

提交回复
热议问题