A strange problem when using pyinstaller packaging

32 views
Skip to first unread message

jytion yu

unread,
Oct 14, 2020, 2:49:11 AM10/14/20
to PyInstaller
I encountered a strange problem when using py packaging.

I use pycharm to develop a project called `deploy` on windows10. `deploy` contains two program files with the same content and different names: `main.py` and `deploy.py`. I used pyinstaller -F to package these two files separately to get `main.exe` and `deploy.exe`, where `main.exe` can run normally, but `deploy.exe` crashes after running. There is no error message when running `deploy.exe` in powershell, just exit directly.
I have tried to recreate venv and other methods to clean up the environment, and simplify the code to output only one line of characters, but the result is the same.
Below is the code of main.py/deploy.py:
if __name__ == '__main__':
    input('bye')
    print("bye")

 I am not sure whether it is caused by the environment or a bug in pyinstaller?

Tonny Gram

unread,
Oct 14, 2020, 5:01:36 AM10/14/20
to PyInstaller
Copy the build script to another location and specify the path to it in PyInstaller.

среда, 14 октября 2020 г. в 09:49:11 UTC+3, yjx.lia...@gmail.com:
Reply all
Reply to author
Forward
0 new messages