Two pyinstaller problems recorded when I first use it.
First problem: DistributionNotFound
Wrap python successfully, but raise pkg_resources.DistributionNotFound error when we run the executable file.
reference https://github.com/pyinstaller/pyinstaller/issues/1713 and https://stackoverflow.com/questions/34775667/pyinstaller-django-pkg-resources-distributionnotfound-the-django-omnibus
Solution:
Create a python file with content like this in the current directory.
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('prettytable')
Than:
pyinstaller xxx.py --additional-hooks-dir=.
Second problem: Ctrl-C
In my code, Ctrl-C used to break the loop
But after I make executable file by pyinstaller, it performance incorrectly:
Method:
pyinstaller xxx.py --bootloader-ignore-signals