Thursday 18 May 2023

pyinstaller is not compatible with python argparse -h

In the python script, ArgumentParser will displays the parser’s help message by default if -h or --help is supplied at the command line.

(base) D:\Study\Github\BVPA-GUI>python src\plot_auto.py -h                         
usage: plot_auto.py [-h] [--legend] [--figname FIGNAME]

optional arguments:
  -h, --help         show this help message and exit
  --legend           Show legend on plot.
  --figname FIGNAME  Specify the window title.

However it will not work if I compile the python script into exe application by pyinstaller.

D:\Study\Github\BVPA-GUI>.\bin\plotting\plot_auto.exe -h

What is the reason for this and what can I do about this?



from pyinstaller is not compatible with python argparse -h

No comments:

Post a Comment