I have been using web2py with Python v2 for a couple of years, and now I would like to switch to Python 3 runtime, but I am not sure what is the proper way?
I am usually installing web2py using the installation script available from here, and it is running under Ubuntu 18.04.
djordje@vmi:~$ python --version
Python 2.7.17
djordje@vmi:~$ python3 --version
Python 3.6.9
djordje@vmi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
I tried to set the default Python version to 3, as explained on this link using:
update-alternatives --remove python /usr/bin/python2
update-alternatives --install /usr/bin/python python /usr/bin/python3 10
and it sets the default Python to v3, but even after rebooting the server - web2py still runs with Python v2.
Version
2.18.5-stable+timestamp.2019.04.08.04.22.03
(Running on nginx/1.14.0, Python 2.7.17)
Is there a recommended way to set web2py to run with Python 3 on Linux?