I just tried a simple hello world app in Python using Flask (From Flask's documentation). I installed Flask using 'pip install flask'. I uninstalled it and installed it again. Still, the issue persists.
Code:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
Error:
Traceback (most recent call last):
File "HelloWorld.py", line 1, in <module>
from flask import Flask
File "C:\Python32\lib\site-packages\flask\__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "C:\Python32\lib\site-packages\werkzeug\__init__.py", line 154, in <module>
__import__('werkzeug.exceptions')
File "C:\Python32\lib\site-packages\werkzeug\exceptions.py", line 111
return u'<p>%s</p>' % escape(self.description)
^
SyntaxError: invalid syntax
Flask does not support Python 3.2; only 3.3+ (and 2.6+)
So you need to install a supported Python version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With