Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing uwsgi with plugins using 'pip'

Tags:

python

pip

uwsgi

I installed uwsgi using pip install uwsgi.

When I run uwsgi, I get a couple of errors. The command I'm running is uwsgi --master --emperor /etc/uwsgi/apps-enabled --die-on-term --uid www-data --gid www-data.

It appears that I'm missing the http and python plugins:

[uWSGI] getting INI configuration from component_tracking_test.ini
open("./http_plugin.so"): No such file or directory [core/utils.c line 3347]
!!! UNABLE to load uWSGI plugin: ./http_plugin.so: cannot open shared object file: No such file or directory !!!
open("./python_plugin.so"): No such file or directory [core/utils.c line 3347]
!!! UNABLE to load uWSGI plugin: ./python_plugin.so: cannot open shared object file: No such file or directory !!!
[emperor] removed uwsgi instance component_tracking_test.ini

How do I install the required plugins given that I have installed uwsgi via pip?

like image 609
Tom Avatar asked May 06 '13 20:05

Tom


2 Answers

When I add "--binary-path /usr/local/bin/uwsgi" (change path to your wsgi bin) to the command, the error went away.

from the docu

binary-path Argument: string

Force binary path.

If you do not have uWSGI in the system path you can force its path with this option to
permit the reloading system and the Emperor to easily find the binary to execute.

like image 149
yvess Avatar answered Sep 28 '22 11:09

yvess


I just had a similar problem and the reason was that I was running sudo uwsgi, not realizing that sudo won't respect the PATH and will launch the system-wide uwsgi. See this answer.

like image 27
KT. Avatar answered Sep 28 '22 11:09

KT.