1

When I have subprocess.check_output function in mycode and I generate an .exe file using pyinstaller with

python pyinstaller.py    --noconsole -F myprogram.py

process stop to work, otherwise every thing is ok!

Do you know any solution with pyinstaller or replace subprocess library with some thing else?

Back2Basics
  • 7,406
  • 2
  • 32
  • 45
amin
  • 621
  • 1
  • 8
  • 20
  • 1
    if there is no console then make sure that you redirect all stdout/stderr to a file from your script and its children (e.g., that are invoked by `check_output()`). Also check that `stdin` is not used; you could redirect it from `os.devnull` for child processes. – jfs Sep 04 '13 at 14:51
  • that's some bug with subprocess or what? but when I use os.popen() instead that works well with pyinstaller – amin Sep 05 '13 at 08:04
  • try to reproduce the error with [`subprocess32` module](https://pypi.python.org/pypi/subprocess32). – jfs Sep 05 '13 at 08:26
  • there is no error to reproduce that simply stop to work when built using --noconsole and works when no noconsole param used – amin Sep 05 '13 at 08:51
  • you said it works with `os.popen()`. Does it work with `subprocess32`? – jfs Sep 05 '13 at 12:54
  • I couldn't try subprocess32 because when i try to install it it says that need some files.bat searching google realized I should use mingw32 to build that but when i try to build using mingw32 it errors occur! – amin Sep 08 '13 at 11:16
  • 1
    I forced to get back to subprocess library, how ever forgetting about -F switch solved every thing and my program work in one directory mode. – amin Sep 09 '13 at 10:39

0 Answers0