Hi, I've just started to create a web app within the pythonanywhere environment.
From the start, I wanted to use Python 2.7 for running my web app, and I did select 2.7 accordingly in the web app settings.
Still, when I run the main program (flask_app.py), it's Python 3.4 which is actually used instead of Python 2.7 since I get the error related to the Flask-WTF which is not installed for Python 3.4 indeed :
Traceback (most recent call last):
File "/home/pwa/mysite/forms.py", line 9, in <module>
from flask.ext.wtf import Form
File "/usr/local/lib/python3.4/dist-packages/flask/exthook.py", line 87, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named flask.ext.wtf
With Python 2.7, I don't expect to get the same kind of error since the import of flask.ext.wtf occurs without any particular problem in a Python 2.7 console:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import flask.ext.wtf
from flask.ext.wtf import Form
How come it's not Python 2.7 that is not running according to the selection I made in the web app settings in the first place?
In other words, how can I force the use of Python 2.7?
Thank you in advance for your help.
pwa