Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/358.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pyinstaller的问题--窗口选项_Python_Pdf_Exe_Pyinstaller_Poppler - Fatal编程技术网

Python pyinstaller的问题--窗口选项

Python pyinstaller的问题--窗口选项,python,pdf,exe,pyinstaller,poppler,Python,Pdf,Exe,Pyinstaller,Poppler,我正在尝试使用Pyinstaller将py文件转换为exe,在引入--windowed或-w选项以隐藏控制台之前,我没有遇到任何问题。使用此选项,不显示依赖于pdf2image模块的任何元素。当我使用选项--debug=all打包exe时,程序根本不运行,并且出现错误“无法执行脚本pyiboot01\u引导”。我已经读到,这个问题可能是由于Pyinstaller不支持Poppler(pdf2image所依赖的),但我尝试过的解决方案都不起作用。我尝试过的事情: 使用pyinstaller-F-w

我正在尝试使用Pyinstaller将py文件转换为exe,在引入
--windowed
-w
选项以隐藏控制台之前,我没有遇到任何问题。使用此选项,不显示依赖于
pdf2image
模块的任何元素。当我使用选项
--debug=all
打包exe时,程序根本不运行,并且出现错误“无法执行脚本pyiboot01\u引导”。我已经读到,这个问题可能是由于Pyinstaller不支持Poppler(pdf2image所依赖的),但我尝试过的解决方案都不起作用。我尝试过的事情:

使用
pyinstaller-F-w-addbinary=“path\to\poppler\bin;”script.py打包,如前所述

使用
pyinstaller-F-w--额外的hook dir=hooks script.py进行打包,如上所述

打包在多个不同版本上:Python3.8.5和Pyinstaller 4.0、Python3.7.9和Pyinstaller 4.0、Python3.7.9和Pyinstaller 3.5。 如果我不使用
-w
选项,我尝试过的每个解决方案都可以工作,但我真的希望在运行exe时不要打开控制台。是什么导致了
-w
选项和
pdf2image
/Poppler之间的冲突?这个问题有解决办法吗?我仍然是Python的初学者,因此我非常感谢您的帮助。谢谢大家!