python程序无法运行出图形化界面
完整报错信息:
“UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.”
以下是引用的模块,检查是否安装好已引用的模块:
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import interp1d
模块安装没有问题,使用查看图像的方法是plt.show()
根据报的错,agg存在问题,那我们就安装使用另外一个图形化PyQt5开发库
PS D:\MyPythonCode\Algorithm\EX07> pip install PyQt5
Defaulting to user installation because normal site-packages is not writeable
Collecting PyQt5
Downloading PyQt5-5.15.9-cp37-abi3-win_amd64.whl (6.8 MB)
━━━━━━━━━━