PyQt5 gets “No module named 'PyQt4'” error calling matplotlib.pyplot in Python 3.5

后端 未结 6 1791
春和景丽
春和景丽 2021-02-11 08:19

I am using Anaconda with Python 3.5.2, Matplotlib 2.0.2, PyQt5.6 on a windows 10 machine. When I import matplotlib.pyplot as plt I get the following error:

...
         


        
6条回答
  •  逝去的感伤
    2021-02-11 09:18

    It seems the API version is PyQt5 but the default is PyQt4,just open Tools -> Preferences -> IPython console -> Graphics -> backend,change QT4 to QT5

提交回复
热议问题