Adding a data file in Pyinstaller using the onefile option

后端 未结 4 1051
感情败类
感情败类 2020-12-05 20:37

I\'m trying to add an image to the one file produced by Pyinstaller. I\'ve read many questions/forums like this one and that one and still it\'s not working.

I know

4条回答
  •  我在风中等你
    2020-12-05 21:03

    I used a command prompt command instead of a .spec

    The command excludes shapely and then adds it back in (I guess this invokes a different import process). This shows how to add folders instead of just files.

    pyinstaller --clean --win-private-assemblies --onefile --exclude-module shapely --add-data C:\\Python27\\Lib\\site-packages\\shapely;.\\shapely --add-data C:\\Python27\\tcl\\tkdnd2.8;tcl main.py
    

提交回复
热议问题