matplotlib error - no module named tkinter

后端 未结 16 1715
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 04:10

I tried to use the matplotlib package via Pycharm IDE on windows 10. when I run this code:

from matplotlib import pyplot

I get the followin

16条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 04:33

    If you are using fedora then first install tkinter

    sudo dnf install python3-tkinter
    

    I don't think you need to import tkinter afterwards I also suggest you to use virtualenv

    $ python3 -m venv myvenv
    $ source myvenv/bin/activate
    

    And add the necessary packages using pip

提交回复
热议问题