Start web2py with different python version

432 views
Skip to first unread message

LoveWeb2py

unread,
Aug 14, 2015, 6:02:43 PM8/14/15
to web2py-users
I'm currently using web2py with wsgihandler.py

When I type "python" in my regular environment it starts with python2.7, but when I start apache using service httpd start web2py defaults to 2.6

Is there anyway I can make web2py use 2.7 which has all my modules?

LoveWeb2py

unread,
Aug 14, 2015, 6:25:21 PM8/14/15
to web2py-users
When I type python web2py.py -S myapp -M the app loads up in python 2.7 just fine, but when I type service httpd start it runs using Python2.6.6

I can't seem to find where the setting to change this is. Any help is really really appreciated.

Massimo Di Pierro

unread,
Aug 16, 2015, 4:24:28 PM8/16/15
to web2py-users
This must be specified in your httpd.conf file somewhere

LoveWeb2py

unread,
Aug 18, 2015, 5:30:29 PM8/18/15
to web2py-users
Hi Massimo,

Thank you so much for your reply. I checked through all .conf files and the only references it makes to any type of python is the wsgi config. I'm using the default wsgi handler that web2py comes with. Is there anything else it could be?

Massimo Di Pierro

unread,
Aug 18, 2015, 6:42:18 PM8/18/15
to web2py-users

LoveWeb2py

unread,
Aug 18, 2015, 7:53:47 PM8/18/15
to web2py-users
Hi Massimo,

Ultimately your answer put me on the right track. Here is what I did to get it to work: https://www.fir3net.com/Programming/Python/how-do-i-compile-modwgsi-for-python-27.html

Thank you so much!
Reply all
Reply to author
Forward
0 new messages