PySide and PyQt clash when packaging pylab under Windows 7

前端 未结 1 1797
礼貌的吻别
礼貌的吻别 2020-12-22 08:32

I tried to package a small script which does some plotting with pylab. I used pyinstaller under Linux without a problem but under Windows 7 I get an error. On a different co

相关标签:
1条回答
  • 2020-12-22 08:46

    I had a closer look at the pyinstaller documentation and found a solution for pyinstaller. I used the excludes option in the Analysis block of the spec file:

    # -*- mode: python -*-
    a = Analysis(['test.py'],
             pathex=['C:\\Workspace\\ZLC_python'],
             hiddenimports=[],
             hookspath=None,
             excludes=['PyQt4'],
             runtime_hooks=None)
    for d in a.datas:
        if 'pyconfig' in d[0]: 
            a.datas.remove(d)
            break
    pyz = PYZ(a.pure)
    exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='test.exe',
          debug=False,
          strip=None,
          upx=True,
          console=True )
    
    0 讨论(0)
提交回复
热议问题