Based on a quick glance through the tutorial, it looks like it might be a package version compatibility issue.
Have you tried upgrading Flask and Werkzeug to the latest versions?
Maybe try:
pip install Flask Werkzeug -U
Answer from Bradley on Stack Overflowpython - ImportError cannot import name 'ContextVar' when using Werkzeug with FlaskAPI - Stack Overflow
ImportError: cannot import name 'ContextVar' from 'werkzeug.local'
Issues with M1
Post the error
More on reddit.compython - How to secure a server-side session in flask? - Stack Overflow
Based on a quick glance through the tutorial, it looks like it might be a package version compatibility issue.
Have you tried upgrading Flask and Werkzeug to the latest versions?
Maybe try:
pip install Flask Werkzeug -U
It's version incompatibility that's causing the issue. A clean uninstall followed by a fresh install should fix the issue.
pip uninstall Flask Werkzeug
pip install Flask Werkzeug
Hello, I am trying to start a flask all but I can’t because I’m getting an error. Has anyone else had issues with the M1 and flask?
Edit: it fixed itself somehow. Computers are weird.
The issue was with Global Python interpreter itself.
I followed Installing Python 3.7 on Ubuntu from Source in https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/ for installing Python 3.7.
Somehow it is not installing all the required packages for python interpreter.
Everything works fine if I install using Installing Python 3.7 on Ubuntu with Apt.
In my case, the python version installed in the virtual environment was 3.7.2 and the only version I had in my Computer was 3.7.3. So, I reinstalled the version 3.7.2 and it worked. Hope it works for you !!!