UWSGI says "ImportError: No module named wsgi"

When uWSGI starts up, it writes

"ImportError: No module named wsgi"


My uwsgi.xml

<!-- UWSGI XML Configuration File -->

    <!-- <socket>/var/www/uwsgi.sock</socket> -->

    <!-- <home>/home/klen/Projects/klen.github.com/_code/uwsgi/.virtualenv</home> -->


    <master />
    <no-orphans />



The server responds in the browser:

"uWSGI Error

Python application not found"


and puts

"[pid: 7529|app: -1|req: -1/1] () {46 vars in 797 bytes} [Mon Mar 26 00:56:53 2012] GET /index.py => generated 48 bytes in 0 msecs (HTTP/1.0 500) 2 headers in 63 bytes (0 switches on core 0)"


in this log file.

I think I need to install the wsgi module for uWSGI as it says "ImportError: No module wsgi". How to check if this module is installed?


source to share

1 answer

You specified <module>wsgi</module>

, and so uWSGI does what you asked, load a named module wsgi

and serve it. How is your python script installed? You didn't even mention that you have a python program to serve.

Perhaps you really need to use a directive <file>

to tell uWSGI the path to read the python file and execute that. If you are using an installed module, replace wsgi

in the tag <module>

with the appropriate module you are trying to execute.



All Articles