Python的tkinter TclError no display name and no $DISPLAY environment variable错误
解决办法:
import matplotlib
matplotlib.use('Agg')
参考
- _tkinter.TclError: no display name and no $DISPLAY environment variable - weixin_34336292的博客 - CSDN博客
- 关于画图问题_tkinter.TclError: no display name and no $DISPLAY environment variable: - 简书
- 运行ggplot出现问题:no display name and no $DISPLAY environment variable - 湛蓝的天空 - CSDN博客
- python - _tkinter.TclError: no display name and no $DISPLAY environment variable - Stack Overflow