美文网首页
Matplotlib is currently using ag

Matplotlib is currently using ag

作者: zeloas | 来源:发表于2020-02-17 12:24 被阅读0次

    问题

    (venv3) ubuntu@ubuntu-nvidia:~/proj/pythontest$ /home/ubuntu/proj/pythontest/venv3/bin/python /home/ubuntu/proj/pythontest/main.py
    /home/ubuntu/proj/pythontest/main.py:39: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
      plt.pause(.001)
    

    UI 没有显示

    原因

    没有安装python-tk

    解决方法

    sudo apt install python-tk
    

    或者

    pip install tk
    

    相关文章

      网友评论

          本文标题:Matplotlib is currently using ag

          本文链接:https://www.haomeiwen.com/subject/aqdbfhtx.html