Pyinstaller 如何制作使用另一个文件夹的独立 exe

时间:2021-02-26 20:37:39

标签: python pyinstaller

这是我用于 pyinstaller 生成可执行文件的目录

-app.py

-lib
  -all the other necessary files for the app.py to run.

pyinstaller 命令

pyinstaller --onefile app.py

问题 它会在 dist 文件夹中创建独立的 exe,但是如果没有同一目录中的 lib 文件夹,它就不会运行。我在pyinstaller中运行什么命令才能让exe自己运行。

1 个答案:

答案 0 :(得分:0)

您可以使用 Auto PY to EXE https://pypi.org/project/auto-py-to-exe/ 并在 exe 文件中包含所有其他必要的文件

相关问题