Consider take a look at working example of uwsgi+web2py configuration here:

https://bitbucket.org/akorn/helloworld/src/tip/01-welcome/web2py/uwsgi.ini

I believe you should set correct path to virtual environment (as well as 
others: pythonpath and chdir). Please note, pythonpath and virtualenv paths are 
relative to `chdir` directory.

Thanks.

Andriy Kornatskyy

________________________________
> Date: Thu, 8 Nov 2012 20:53:44 +0100 
> From: [email protected] 
> To: [email protected] 
> CC: [email protected] 
> Subject: Re: [uWSGI] uwsgi + web2py + Custom Python Build 
>  
> Hmm... shouldn't you be using --virtualenv option? pointing to projects  
> virtualenv top directory 
>  
> site.py is responsible for setting up python paths. this is basically  
> what activate/deactivate scripts depend on 
>  
> check also sys.prefix/sys.real_prefix and what they point to 
>  
> W dniu 08.11.2012 14:59, Phyo Arkar pisze: 
> This is more uwsgi problem so here: 
>  
> I am doing a self contained , relocatable , standalone python build  
> with uwsgi, web2py , scipy (Numpy,matplotlib) 
>  
> Everything works fine in relocatable enviorment but Uwsgi is having  
> this error : 
>  
> uwsgi socket 0 bound to UNIX address /home/uwsgi/uwsgi/uwsgi.sock fd 3 
> Python version: 2.7.2+ (default, Dec  1 2011, 02:17:49)  [GCC 4.6.2] 
> Set PythonHome to ./web2py 
> ImportError: No module named site 
>  
> Here is my uwsgi config : 
>  
> #!/bin/bash 
> ./runtime/bin/uwsgi --http :8000 --chdir ./web2py/ --python-path  
> ./web2py/ --module uwsgihandler \ 
> -p 6 --post-buffering 65535 \ 
> --close-on-exec  --socket-timeout 6000 \ 
>  
>  
> Directly running web2py works perfectly fine. 
>  
> Any ideas?  ALso its seems running python using system python , anyway  
> to force it to use Custom built python? 
>  
>  
>  
> _______________________________________________ 
> uWSGI mailing list 
> [email protected]<mailto:[email protected]> 
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi 
>  
>  
>  
> --  
> Pozdrawiam, 
>  
> Łukasz Czuja 
>  
> Programista / Analityk / Architekt IT 
>  
> _______________________________________________ uWSGI mailing list  
> [email protected]  
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi 
                                          
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to