uwsgi from python2.7 to python3

71 views
Skip to first unread message

António Ramos

unread,
May 20, 2020, 4:24:56 PM5/20/20
to web...@googlegroups.com
hello i´m using webfaction and this script 
that installed web2py a loong time ago.

now i want to use python3.5.9 already available as python3 instead of python 2.7

i read this in the start conf

#!/bin/bash

# Start uwsgi
/home/ramstein74/webapps/new2py/bin/uwsgi   --uwsgi-socket "/home/ramstein74/webapps/new2py/uwsgi.sock"   --master   --workers 1   --max-requests 10000   --harakiri 60   --daemonize /home/ramstein74/logs/user/uwsgi_new2py.log   --pidfile /home/ramstein74/webapps/new2py/uwsgi.pid   --vacuum   --chdir /home/ramstein74/webapps/new2py   --python-path /home/ramstein74/webapps/new2py/lib/python2.7   --wsgi-file /home/ramstein74/webapps/new2py/web2py/wsgihandler.py 
# Start nginx
/home/ramstein74/webapps/new2py/bin/nginx

changing python2.7 to python3 does not work.

Any ideas would be awesome :)

regards 

Clemens

unread,
May 21, 2020, 12:28:38 PM5/21/20
to web2py-users
Have you already installed the python-3-uwsgi-lib?

pip3 install --no-binary :all: --upgrade uwsgi

Have a try!

Regards
Clemens

António Ramos

unread,
May 21, 2020, 1:13:17 PM5/21/20
to web...@googlegroups.com
no, but i dont want to mess with uwsgi because i may need to use python 2.7 again as i´m fixing code bugs from 2.7 to 3.
will i have problems upgrading uwsgi but using python 2.7?


--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/c8ee09cc-ad06-43db-ac61-05700bc0297f%40googlegroups.com.

Dave S

unread,
May 27, 2020, 1:53:30 AM5/27/20
to web2py-users


On Thursday, May 21, 2020 at 6:13:17 AM UTC-7, Ramos wrote:
no, but i dont want to mess with uwsgi because i may need to use python 2.7 again as i´m fixing code bugs from 2.7 to 3.
will i have problems upgrading uwsgi but using python 2.7?



Can you use a virtual env or a docker container?

/dps
 
To unsubscribe from this group and stop receiving emails from it, send an email to web...@googlegroups.com.

Daniel Holth

unread,
Jun 20, 2020, 8:14:58 PM6/20/20
to web2py-users
In uwsgi you need to use a separate plugin for each version of Python. You start with a version of uwsgi with no languages compiled in, the OS uWSGI packages are typically built this way. You obtain a different Python plugin for each version of Python that you want to use. Then you run your Python 2 applications with --plugin=python2 and your Python 3 applications with --plugin=python37 for example.
Reply all
Reply to author
Forward
0 new messages