Include a json file with exe pyinstaller

前端 未结 2 1143
花落未央
花落未央 2021-01-24 12:06

I have been reading the documentation of the pyinstaller for hours. I cannot understand how to use the option --resource RESOURCE

It says

-r RES

2条回答
  •  旧时难觅i
    2021-01-24 13:10

    I converted the python application to exe with pyinstaller using below cmmand

    pyinstaller --onefile main.py
    

    and then I copied the json file to the dist folder created by pyinstaller and it worked. hope this helps you to resolve this issue.

    Note : I havent included any resource command with pyinstaller

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题