python - 排除 Pyinstaller 中的文件

标签 python pyinstaller

在 Pyinstaller 编译时创建的规范文件中,我添加了

excludes=["mfc90u.dll", "mfc90.dll"],

但是编译后可以在编译目录下找到这两个文件。但是当我添加该行时

excludes=["FixTk", "tcl", "tk", "tkinter", "Tkinter"],

它工作得很好。将文件转换为 Windows AppX 格式时,mfc90u.dll 和 mfc90.dll 会导致错误,我想排除它们。 如何防止将我想要的文件和文件夹添加到编译中?

最佳答案

这对我有用(“a”是分析对象):

a.binaries = TOC([x for x in a.binaries if x[0] not in excludes])

关于python - 排除 Pyinstaller 中的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45149887/

相关文章:

python - 詹森-香农散度

python - 在python中按列连接两个大文件

python - 使用 urllib 登录网站

java - 如何检查Windows版本是否是正版?

anaconda - PyInstaller win32ctypes.pywin32.pywintypes.error : (2, 'LoadLibraryExW' , 'The system cannot find the file specified.')

python - 使用 PyInstaller 制作的 pyOpenGL exe 给出属性错误

python - 函数包装装饰器的 "Bootstrap issues"是什么?

python - runningslserver 命令在 django 中无法使用 pyinstaller 构建的可执行文件运行

python - 如何正确创建 pyinstaller Hook ,或者隐藏导入?

macos - 当 pyinstaller 发现版本冲突时手动指定库