【发布时间】:2019-07-17 17:33:52
【问题描述】:
我使用包含hangman 游戏单词库的同一目录中的其他.txt 文件构建了一个hangman 游戏,当我使用pyinstaller 打包我使用时,这些文件是从hangman.py 文件中打开的path\to\pyinstaller.exe hangman.py --onefile 但这不允许在可执行文件中使用 .txt 文件。如何打包 .txt 文件使可执行文件能够正常运行?
【问题讨论】:
-
试试
path\to\pyinstaller.exe --onefile hangman.py
标签: python pyinstaller packaging python-packaging