Reputation: 161
flask run
ends with the error ImportError: cannot import name '_request_ctx_stack' from 'flask'
Common question it seems, but I cannot find a straight answer for any recent versions of Flask. At present I am using Flask 3.0.3 and I have run pip install -r requirements.txt --upgrade
to get the latest version of everything. At present my requirements are
blinker==1.8.2
certifi==2024.7.4
cffi==1.16.0
chardet==3.0.4
click==8.1.7
cryptography==42.0.8
Flask==3.0.3
Flask-Login==0.4.1
idna==2.8
importlib_metadata==8.0.0
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
oauthlib==3.0.1
pycparser==2.22
pyOpenSSL==24.1.0
python-dotenv==1.0.1
requests==2.21.0
six==1.16.0
urllib3==1.24.3
Werkzeug==3.0.3
zipp==3.19.2
Is there an actual solution to this? Every "solution" I've found comes with other problems and sends me in circles. Is Flask just broken in its current version? And if so, what versions of things can I use to make this work?
Upvotes: 0
Views: 103