ImportError: No module named django.core.wsgi Apache + VirtualEnv + AWS + WSGI

后端 未结 10 851
予麋鹿
予麋鹿 2020-11-29 03:34

I am trying to publish my site on an Amazon\'s EC2 Instance, and I keep getting a 500 error. I really dunno why.

//Log Files

    [Sun Feb 17 23:12:48         


        
10条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 03:48

    I had a similar error just now. It turns out that our Django code was developed on python 3.5, but for some reasons the people who deployed our server setup virtualEnv with python 2.7. We redeployed with python 3.5 and everything worked for us

    Below was the error message I received:

    $ python serviceStartup.py 
    Traceback (most recent call last):
      File "serviceStartup.py", line 10, in 
        from django.core.wsgi import get_wsgi_application
    ImportError: No module named django.core.wsgi
    

    Hope this will help with anyone seeing a similar error message!

提交回复
热议问题