Friday, June 2, 2017

Re: uWSGI ModuleNotFoundError Django 1.11

On Friday 02 June 2017 12:53:06 F. Nikita Thomas wrote:

> Thank you everyone and my apologies for the late reply, a friend

> passed. I did as requested and here are the results:

>

>

> [user@echo project]$ which python

> /usr/bin/python

> [user@echo project]$ python -V

> Python 2.7.5

 

So at this point start uwsgi.

Not after activation of the virtualenv. Let uwsgi activate it by itself.

 

Personally, I don't have these issues as uwsgi is started by root as a service, with a somewhat clean environment. I can start it as:

 

sudo env -i PATH=/bin:/usr/bin:/usr/local/bin \

/usr/local/etc/rc.d/uwsgi start

 

and it still works (and no leakage of shell env of user to wsgi requests). I'm on FreeBSD, so hence no init.d but rc.d. Principle is the same though.

--

Melvyn Sopacua

No comments:

Post a Comment