ImportError: No module named django.core.wsgi for uwsgi

前端 未结 6 2420
Happy的楠姐
Happy的楠姐 2020-12-09 02:55

I\'m using uwsgi for my Django(version =1.4) project, but there\'s an error if I run

uwsgi --ini django.ini
from django.core.wsgi impor         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 03:45

    In my case, I installed the Django application and everything else for Python3, but the uwsgi was using Python2. Just check the log while running uwsgi whether it is using Python2 or Python3, and reinstall uwsgi if it is not consistent. Look for the line similar to below line in uwsgi startup log.

    Python version: 3.4.3 (default, Oct 14 2015, 20:31:36) [GCC 4.8.4] VS Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2]

提交回复
热议问题