I had the same problem. It is because Werkzeug 3.0.0 was released and Flask doesn't specify the dependency correctly (requirements says Werkzeug>=2.2.0). This is why, Werkzeug 3.0.0 is still installed and Flask 2.2.2 isn't made for Werkzeug 3.0.0.

Solution: Just set a fix version for Werkzeug such as Werkzeug==2.2.2 in your requirements.txt and it should work.

Answer from Scrashdemix on Stack Overflow
🌐
GitHub
github.com › Neurotech-HQ › heyoo › issues › 106
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' · Issue #106 · Neurotech-HQ/heyoo
May 26, 2024 - (venv) user@server:~/project$ python hook.py Traceback (most recent call last): File "/path/to/project/hook.py", line 5, in <module> from flask import Flask, request, make_response File "/path/to/project/venv/lib/python3.12/site-packages/flask/__init__.py", line 5, in <module> from .app import Flask as Flask File "/path/to/project/venv/lib/python3.12/site-packages/flask/app.py", line 30, in <module> from werkzeug.urls import url_quote ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/path/to/project/venv/lib/python3.12/site-packages/werkzeug/urls.py).
Author   Neurotech-HQ
Discussions

cannot import name 'url_quote' from 'werkzeug.urls' when using show(dt.explain_global())
Installed interpreter & werkzeug versions: interpret==0.4.3 interpret-core==0.4.3 interpret_community==0.31.0 Werkzeug==3.0.1 python version 3.9 ` from sklearn.metrics import roc_auc_score from int... More on github.com
🌐 github.com
5
February 7, 2024
Cannot import name 'url_quote' from 'werkzeug.urls'
Wonderful tutorial -- thanks so much. I ran into an import error on the catnip example, in the run command: sudo docker run -p 8888:5000 /catnip #ImportError: cannot import name ... More on github.com
🌐 github.com
11
October 2, 2023
werkzeug 3.0.0 Import issue with url_quote
This issue tracker is a tool to address bugs in Werkzeug itself. Please use Pallets Discord or Stack Overflow for questions about your own code. Getting this error message when on 3.0.0: ImportError: cannot import name 'url_quote' from '... More on github.com
🌐 github.com
3
October 2, 2023
Problems deploying endpoint for service which previously worked fine through azure machine learning
Consistently get this strange error when trying to deploy an endpoint Realtime endpoint deploy 'endpoint1' failed Deploy: Failed on Waiting real-time endpoint creation. Details: AzureML service API error. Error in entry script, ImportError: cannot… More on learn.microsoft.com
🌐 learn.microsoft.com
0
3
January 19, 2024
🌐
GitHub
github.com › Sanster › IOPaint › issues › 389
[BUG] ImportError: cannot import name 'url_quote' from 'werkzeug.urls' · Issue #389 · Sanster/IOPaint
October 4, 2023 - ow: 10.0.1 - diffusers: 0.16.1 - transformers: 4.27.4 - opencv-python: 4.8.1.78 - xformers: N/A - accelerate: N/A - lama-cleaner: 1.2.3 - rembg: N/A - realesrgan: N/A - gfpgan: N/A Traceback (most recent call last): File "D:\miniconda3\envs\lama\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\miniconda3\envs\lama\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\miniconda3\envs\lama\Scripts\lama-cleaner.exe\__main__.py", line 7, in <module> sys.exit(entry_point()) File "D:\miniconda3\envs\lama\lib\site-packages\lama_cleane
Author   Sanster
🌐
GitHub
github.com › interpretml › interpret › issues › 509
cannot import name 'url_quote' from 'werkzeug.urls' when using show(dt.explain_global()) · Issue #509 · interpretml/interpret
February 7, 2024 - Error: cannot import name 'url_quote' from 'werkzeug.urls' (.../venv/lib/python3.9/site-packages/werkzeug/urls.py)
Author   interpretml
🌐
YouTube
youtube.com › tech conclave
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' - YouTube
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (C:\Python311\Lib\site-packages\werkzeug\urls.py)
Published   September 12, 2024
Views   180
🌐
GitHub
github.com › prakhar1989 › docker-curriculum › issues › 381 › linked_closing_reference
Cannot import name 'url_quote' from 'werkzeug.urls' · Issue #378 · prakhar1989/docker-curriculum
October 2, 2023 - Wonderful tutorial -- thanks so much. I ran into an import error on the catnip example, in the run command: sudo docker run -p 8888:5000 /catnip #ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/...
Author   prakhar1989
Find elsewhere
🌐
NI18
blog.ni18.in › how-to-fix-importerror-cannot-import-name-url_quote-from-werkzeug-urls-in-flask
How to Fix "ImportError: cannot import name 'url_quote' from 'werkzeug.urls'" in Flask
March 25, 2025 - The url_quote function, in particular, ... clean and functional. If your Flask app was working fine before, why did it break now? The short answer: a recent update to Werkzeug....
🌐
GitHub
github.com › pallets › werkzeug › issues › 2789
werkzeug 3.0.0 Import issue with url_quote · Issue #2789 · pallets/werkzeug
October 2, 2023 - This issue tracker is a tool to address bugs in Werkzeug itself. Please use Pallets Discord or Stack Overflow for questions about your own code. Getting this error message when on 3.0.0: ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.11/site-packages/werkzeug/urls.py) Not getting this issue with version before 3.0.0
Author   pallets
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1503170 › problems-deploying-endpoint-for-service-which-prev
Problems deploying endpoint for service which previously worked fine through azure machine learning - Microsoft Q&A
January 19, 2024 - Details: AzureML service API error. Error in entry script, ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/azureml-envs/azureml_0b7fd039ff7091354df5c3f6459a980c/lib/python3.8/site-packages/werkzeug/urls.py), please run print(service.get_logs()) to get details.
🌐
Stack Overflow
stackoverflow.com › questions › 78006192 › importerror-cannot-import-name-url-quote-from-werkzeug-urls
flask - ImportError: cannot import name 'url_quote' from 'werkzeug.urls' - Stack Overflow
You could either downgrade to Flask 2.3.x (and Werkzeug 2.3.x) or use authlib or any other oauthlib so you can use Flask 3.0.x ... Sign up to request clarification or add additional context in comments. ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 204 Why did Flask start failing with "ImportError: cannot import name 'url_quote...
🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 34937
mysite stops working after I tried to update flask to 2.2 version : Forums : PythonAnywhere
August 2, 2024 - 2024-08-02 02:55:46,520: If you're seeing an import error and don't know why, 2024-08-02 02:55:46,522: we have a dedicated help page to help you debug: 2024-08-02 02:55:46,522: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2024-08-02 02:55:46,523: *************************************************** 2024-08-02 02:56:47,857: Error running WSGI application 2024-08-02 02:56:47,864: ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/KTRANS/.local/lib/python3.10/site-packages/werkzeug/urls.py) 2024-08-02 02:56:47,864: File "/var/www/ktrans_pythonanywhere_com_wsgi.p
🌐
Priviw Community
discuss.priviw.com › scripting
Solved: ImportError: cannot import name 'url_quote' from 'werkzeug.urls' - Scripting - Priviw Community
October 15, 2023 - I have a backend application in Flask 2.0.2 and running my app in Python3.8 , It was all working well till last week . All of a sudden i face this problem when i start the application using gunicorn # ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
🌐
University Innovation Hub
gws.sandbox.iam.s.uw.edu › home › leak
Cannot Import Name 'Url_quote' From 'Werkzeug.urls' - University Innovation Hub
August 14, 2025 - This error indicates that the interpreter cannot locate or access the url_quote function within the Werkzeug.urls module. As a result, any code relying on this function will fail to execute properly, leading to unexpected behavior or errors ...
🌐
Reddit
reddit.com › r/techsupport › "importerror: cannot import name 'url_quote' from 'werkzeug.urls' " someone pls help me
r/techsupport on Reddit: "ImportError: cannot import name 'url_quote' from 'werkzeug.urls' " someone pls help me
October 8, 2023 - A lot of stuff that I've found me told me to go to terminal and type "pip install werkzeug==2.3.3". I use a chromebook and linux, so that command…
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2261139 › guidance-on-maintaining-uptime-when-python-librari
Guidance on Maintaining Uptime When Python Libraries Are Yanked or Deprecated in Azure Functions - Microsoft Q&A
April 24, 2025 - However, Azure Functions environment pulled a newer version of Werkzeug (e.g., 2.1 or later) which no longer contained url_quote. This mismatch caused the app to fail at import time.
🌐
Odoo
odoo.com › forum › help-1 › getting-importerror-cannot-import-name-url-from-werkzeugurls-while-installing-odoo17-238903
Getting ImportError: cannot import name 'URL' from 'werkzeug.urls' while installing odoo17. | Odoo
December 6, 2023 - Hello! I'm getting import error while installing odoo17 community in my local system. File "/home/siddharth/odoo/odoo/odoo/ http.py [1] ", line 161, in from werkzeug.urls import URL, url_parse, url_encode, url_quote ImportError: cannot import name 'URL' from 'werkzeug.urls' (/home/siddharth/py3.12-env/lib/python3.12/site-packages/werkzeug/ urls.py [2] ) I tried to change versions of Werkzeug library and tried with lower Python versions also.
🌐
GitHub
github.com › pallets › flask › discussions › 5506
FLASK==3.0.3/ Werkzeug==3.0.0 Cannot import name 'url_quote' from 'werkzeug.urls' · pallets/flask · Discussion #5506
June 21, 2024 - I keep getting the error: Cannot import name 'url_quote' from 'werkzeug.urls'. I'm using python 3.12 I've tried the following combinations with no success: Flask==3.0.3 Werk...
Author   pallets
🌐
51CTO
blog.51cto.com › u_12763213 › 9147183
cannot import name 'url_quote' from 'werkzeug.urls' ...
The security policy of this website has blocked you from further access. Contact the site owner and provide the Request ID shown on this page · If you are the owner of this website: Refer to the EdgeOne Web Security Analytics documentation for further instructions