问题描述
用tensorboard查看训练可视化数据时出错
ImportError: cannot import name 'escape' from 'markupsafe' (unknown location),查了一下应该是因为markupsafe更新之后escape函数被移除或者是更改了位置。
解决方案
降低markupsafe的版本即可。
pip uninstall markupsafe
pip install markupsafe==2.1.3
附记
python==3.8.18
tensorboard==2.10.1
markupsafe==2.1.3
werkzeug==0.42.0