Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure uwsgi to use multiple python paths

Tags:

python

uwsgi

wsgi

Is it possible to configure uwsgi to use multiple python paths?

I have defined a python path in my uwsgi.ini file, but I need to also use a code from a second python project. My current python path configuration:

pythonpath = /Users/vingtoft/Documents/Development/archii/server/archii2/app/
like image 990
Vingtoft Avatar asked Jan 25 '16 11:01

Vingtoft


1 Answers

There are seem to be at least 4 ways to achieve that:

  1. specify pythonpath twice in uwsgi.ini;
  2. pass --pythonpath argument to uwsgi command twice;
  3. set PYTHONPATH environment variable with paths concatenated with a colon;
  4. add extra paths to sys.path somewhere in your code.
like image 164
Vlad Frolov Avatar answered Sep 19 '22 16:09

Vlad Frolov