多个隐藏导入错误Pyinstaller

时间:2018-05-21 06:47:06

标签: python import pyinstaller importerror

我有一个脚本导入模块tkinter,pyautogui和pyAesCrypt。 (和其他一些人一样,但这三个人不能进口)

如果我启动导出的应用程序,则会因导入错误而终止。它无法导入tkinter。 (tkinter是脚本中导入的第一个模块)

所以我知道我必须使用 - hidden-import 作为pyinstaller。我将spec文件中的hidden-imports编辑为

hiddenimports=['tkinter','pyautogui','pyAesCrypt'],

我用pyinstaller重试了安装:

pyinstaller Sub.py --specpath=test

Sub.py 是脚本的名称。 test 是spec文件所在的目录。

但这并没有改变任何事情。安装后,只有spec文件中的hidden-import行为空。 我做错了什么?

0 个答案:

没有答案