Can't start uWSGI server without virtualenv (ImportError) Can't start uWSGI server without virtualenv (ImportError) django django

Can't start uWSGI server without virtualenv (ImportError)


Since I hit my head on this problem too, let's write an answer for all. :)The problem is that, when starting in emperor mode (system wide), the uwsgi master process can't (or won't) load the correct environ for python (PYTHONPATH).Using virtualenv you specify the environ.Without it you need to set the pythonpath variable, even multiple times pointing to the system-wide python paths.

Just as an example, for my system it's:

pythonpath = /usr/local/lib/python2.7/dist-packagespythonpath = /usr/lib/python2.7

(using the ini syntax)