from PyQt4 import QtCore, QtGui ImportError: No module named PyQt4

    xiaoxiao2022-07-14  185

    在linux服务器端执行python脚本,有时候需要画图,但是linux没有GUI界面,因此需要在导入matplotlib.pyplot库之前先执行

    import matplotlib as mpl

    mpl.use(‘Agg’)

    再执行

    import matplotlib.pyplot as plt

    最新回复(0)