I have already tried
pyinstaller --onefile main.py
And later, after adding image path to datas[] in main.spec
pyinstaller main.spec
I get this:
Unable to find "/usr/include/python3.6m/pyconfig.h" when adding binary and data files.This would mean your Python installation doesn't
come with proper library files. This usually happens by missing development
package, or unsuitable build parameters of Python installation.