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

前端 未结 6 2413
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:42

    Since you accepted the answer which mentions virtualenv, it seems that you use it. In this case make sure that django is installed in your virtualenv directory (say venv).

    You can separately install it from pip under virtualenv or manually create a symbolic link (if you are on Unix-like system) to venv's site-packages

    ln -s /usr/path_to_django venv/lib/python2.7/site-packages/django
    

提交回复
热议问题