解决flask和werkzurg的版本冲突

flask和werkzurg的版本冲突,在这里也贴上解决方法,供后面踩坑的小伙伴参考:
报错:AttributeError: 'Request' object has no attribute 'is_xhr'
解决:The Werkzeug library (dependency from Flask) recently received a major update (0.16.1 --> 1.0.0) and it looks like Flask (<=0.12.4) does not restrict it.

You have 2 options:

Stick with your current version of Flask and restrict the Werkzeug version that is fetched explicitly in your application's setup.py or requirements.txt (werkzeug<1.0)

Upgrade to a recent version of Flask (>=1.0.0), whichis running fine with latest Werkzeug