Reputation: 11
import flask
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\vigne\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\__init__.py", line 17, in <module>
from werkzeug.exceptions import abort
File "C:\Users\vigne\AppData\Local\Programs\Python\Python36\lib\site-packages\werkzeug\__init__.py", line 1, in <module>
from .serving import run_simple
File "C:\Users\vigne\AppData\Local\Programs\Python\Python36\lib\site-packages\werkzeug\serving.py", line 31, in <module>
from .exceptions import InternalServerError
File "C:\Users\vigne\AppData\Local\Programs\Python\Python36\lib\site-packages\werkzeug\exceptions.py", line 884, in <module>
class Aborter:
File "C:\Users\vigne\AppData\Local\Programs\Python\Python36\lib\site-packages\werkzeug\exceptions.py", line 906, in Aborter
) -> t.NoReturn:
AttributeError: module 'typing' has no attribute 'NoReturn'
I am getting this error whenever I try importing Flask.
Currently, I am on Python version 3.6.0.
Upvotes: 1
Views: 11392
Reputation: 978
They fixed this issue in a new release (Flask 2.0.1).
Try updating flask with pip install Flask --upgrade
. Alternatively, upgrade your Python version to 3.6.2.
Upvotes: 1
Reputation: 21
I ran into the same problem and it has to do with the version of Python==3.6.0 that you are using. As suggested by Alveona, upgrading it to 3.6.2 fixed this issue.
Upvotes: 2