Python - Trouble in building executable

后端 未结 4 1937
别跟我提以往
别跟我提以往 2020-12-03 18:36

I\'m a python programmer and I\'m trying to build an executable binary to distribute my software to my clients, even if it\'s not fully executable I want to be able to distr

4条回答
  •  感动是毒
    2020-12-03 19:34

    Here is a solution of your question: I have modify a code little and it should be work since I had a same issue and I solved it:

    from distutils.core import setup
    import py2exe
    
    wd_base = 'C:\\Python27\\Lib\site-packages\\selenium-2.44.0-py2.7.egg    \\selenium\\webdriver'
    RequiredDataFailes = [
    ('selenium/webdriver/firefox', ['%s\\firefox\\webdriver.xpi'%(wd_base), '%s\\firefox\\webdriver_prefs.json'%(wd_base)])
    ]
    
    setup(
    windows=[{"script":"gui_final.py"}],options={"py2exe":{"skip_archive": True,"includes":["sip"]}},
    data_files=RequiredDataFailes,
    
    )
    

提交回复
热议问题