1. Error1
    from PyQt5 import QtCore, QtGui, QtWidgets
    ImportError: libGL.so.1: cannot open shared object file: No such file or directory
    • sovle:
      安装:
      yum install mesa-libGL-devel
  2. Error2:
    in _create_qApp
    raise RuntimeError(‘Invalid DISPLAY variable’)
    RuntimeError: Invalid DISPLAY variable
    • solve:
      1. 在本地运行
      2. 在导入matplotlib模块前添加:
        import matplotlib
        matplotlib.use(‘Agg’)
      3. 修改plt.show()代码为plt.savefig()
        pytorch tutorials运行
      4. 启动时添加参数:
        python xxx.py -d Agg
        pytorch tutorials运行
      5. 生成图片
        pytorch tutorials运行
        pytorch tutorials运行

相关文章:

  • 2021-05-29
  • 2021-05-28
  • 2018-02-05
  • 2022-12-23
  • 2022-01-13
  • 2022-01-04
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2022-01-23
  • 2021-10-30
  • 2022-01-08
  • 2021-09-16
  • 2021-11-10
相关资源
相似解决方案