I'm facing a problem that is happening only at some windows machine(user environment). The behavior is awkward because I can get the expected result if I use PyInstaller with "--debug=all" option.
PyInstaller works as I expected if I run the exe file at development environment or if I run the exe file built from user's environment.
If I run PyInstaller using the following command... It is possible to see the print content after running the exe file
python -m PyInstaller --onefile hello.py --debug=all
But if I use PyInstaller with the following command... No print content is shown
python -m PyInstaller --onefile hello.py
This is my hello.py:
#!/usr/bin/env python3
if __name__ == "__main__":
print("hello world")
Some information about my environment:
>python --version
Python 3.9.1
>pip list
Package Version
------------------------- ---------
altgraph 0.17
future 0.18.2
pefile 2019.4.18
pip 20.2.3
pyinstaller 4.1
pyinstaller-hooks-contrib 2020.11
pywin32-ctypes 0.2.0
setuptools 49.2.1
I used process monitor to track possible missing DLLs and I saw that debug file is loading more DLL than nodebug file.
Could anyone help me understand what is the cause and if it has any work around?
Obs1: Both user environment and developer environment are using windows 10 pro
Obs2: Install Microsoft Visual C++ Redistributable 2015 and 2017 at user's environment has NO effect
Obs3: I have a different development environment (it has many visual studio versions too) that I had the same problem. The problem was solved after I install visual studio 2019. I don't want to apply the same solution before I have a better understanding about the cause. Could anyone help me understand how visual studio 2019's DLLs might affect?
question from:
https://stackoverflow.com/questions/65618171/pyinstaller-has-different-behavior-with-debug-all-parameter 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…