import error while bundling using py2exe

后端 未结 2 673
有刺的猬
有刺的猬 2021-01-03 06:23

I bundled a small script written in python using py2exe. The script uses many packages and one of them is reportlab. After bundling using py2exe I tried to run the execut

2条回答
  •  借酒劲吻你
    2021-01-03 07:19

    Skip graphics if you are not using them...

    packages= [
        'reportlab',
        'reportlab.lib',
        'reportlab.pdfbase',
        'reportlab.pdfgen',
        'reportlab.platypus',
    ]
    
    setup(name='pitman',
        version='1.0',
        author='cue',
        data_files = dataFiles,
        console=['xxx.py', 'yyy.py'],      # change to windows=[...]
        options = {
            "py2exe": { "dll_excludes": ["MSVCP90.dll"],
                        "packages": packages,
                        "includes": includes }
                      }
      )
    

提交回复
热议问题