Hello everyone,

The problem is the following

on centos 7 the default version of python is 2.7.5
therefore I had to install 2.7.15 (application is old and works with that 
version of  python so we take that as the default)..

I set up an virtual env with python 2.7.15. and the app runs when run from 
web2py command lined python  webpy.py etc...

when i use uwsgi, the uwsgi is not using the correct python and I am gettin 
the psycopg2 problem... If installed over pip or sudo pip or whatever the 
problem perssists.

this is uwsgi log

Starting uWSGI 2.0.21 (64bit) on [Mon Feb 13 14:49:09 2023] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-44) on 13 February 
2023 09:51:27
os: Linux-3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023
nodename: localhost.localdomain
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/woshi/my27project
detected binary path: /usr/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /opt/web2py
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 6963
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :80 fd 4
spawned uWSGI http 1 (pid: 23528)
uwsgi socket 0 bound to TCP address 127.0.0.1:45807 (port auto-assigned) fd 
3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***



If I run the nginx and all the related stuff the same error occurs although 
in my web2py.ini file i have the following

[uwsgi]
plugin = python2.7
plugins-dir = /usr/lib64/uwsgi
logto = /opt/web2py/uwsgi.log
chdir = /opt/web2py
module = wsgihandler
callable = application
master = true
processes = 5
uid = woshi
socket = /run/uwsgi/web2py.sock
chown-socket = woshi:nginx
chmod-socket = 660
vacuum = true
virtualenv = /home/woshi/my27project
pythonpath = /home/woshi/my27project/bin/
#pythonpath = /home/woshi/my27project/lib/python2.7

If I comment python path it works but the wrong python is used by uwsgi 
while if pythonpath is userd the nginx returns an error. 

uwsgi was installed within virtual env and i even did another pyton 2.7.15 
pip installation.

Any suggestions?

I am strugling with this for ages now

thank you.

best regards

Vid

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/52e48bb2-2377-4d6a-973f-5867b795e762n%40googlegroups.com.

Reply via email to