. Advertisement .
..3..
. Advertisement .
..4..
We make sure that all of you can encounter the “Importerror: cannot import name ‘parse_rule’ from ‘Werkzeug.routing’” during using Python programming language. Do not worry; follow this post to study how to fix this error.
When will the “Importerror: cannot import name ‘parse_rule’ from ‘Werkzeug.routing'” occur?
This error will happen when you are running your Python project. For example, the error appears on your screen below if you do a big project and try to import something.
ImportError: cannot import name 'parse_rule' from 'werkzeug.routing'
Here is the root cause of this issue:
The version of ‘Werkzeug’ is outdated – In this situation, the error will display on your Python program because of your old version of ‘Werkzeug.’ Users can find the instant ‘Werkzeug’ version was outdated and could not support a wide range of new constraints.
How to fix the “Importerror: cannot import name ‘parse_rule’ from ‘werkzeug.routing'”?
To fix the “Importerror: cannot import name ‘parse_rule’ from ‘Werkzeug.routing'”, you just downgrade ‘Werkzeug (version 2.1.2).’
Initially, you open the terminal and run the command below:
pip install Werkzeug==2.1.2 :: Downgrade werkzeug to version 2.1.2 ::
Then, you will see that this error can be eliminated.
Conclusion
We hope you can gain a deeper insight into how to solve this “ImportError: cannot import name ‘parse_rule’ from ‘Werkzeug.routing’”. Lastly, drop in more comments below if you need our assistance. Thank you!
Read more:
→ Fixing “ImportError: cannot import name ‘json’ from ‘itsdangerous’”
Leave a comment