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

后端 未结 6 1823
春和景丽
春和景丽 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:09

    Looking at the file and line number in your error it looks that you have the same issue that I answered here.

    That is, I think your issue is caused by having a QT_API environment variable that still is set to pyqt4 (or pyside).

提交回复
热议问题