pyinstaller one file --no-console does not work “Fatal Error”

前端 未结 3 1477
醉酒成梦
醉酒成梦 2020-12-06 08:44

I try 2 options with pyinstaller one with console and one without.

I am using Windows 10, Python 3.5.4, Windows Chrome Driver 2.33 and Selnium 3.6.0 and Pyinstaller

3条回答
  •  一整个雨季
    2020-12-06 09:03

    after some search I found the full solution : Firstly go to -

    C:\Python35\Lib\site-packages\selenium\webdriver\common\service.py
    

    Change :

    self.process = subprocess.Popen(cmd, env=self.env,
                                                close_fds=platform.system() != 'Windows',
                                                stdout=self.log_file, stderr=self.log_file)
    

    To:

    self.process = subprocess.Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=False, creationflags=0x08000000)
    

    now simply build your app.py like this:

    pyinstaller --noconsole --onefile  --noupx   Yourfile.py
    

提交回复
热议问题