我使用pyinstaller
打包我的应用程序。它创建了二进制文件,但它无法正常工作。当我在终端上加载应用程序时,我看到了这个错误
[9854] LOADER: Running BC_GUI_Client.py
Traceback (most recent call last):
File "FALCON_BC_CLIENT/BC_GUI_Client.py", line 145, in <module>
File "PIL/ImageTk.py", line 127, in __init__
File "PIL/ImageTk.py", line 192, in paste
File "/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 687, in load_module
module = imp.load_module(fullname, fp, filename, ext_tuple)
ImportError: No module named _tkinter_finder
[9854] Failed to execute script BC_GUI_Client
我正在使用python 2.7并安装了pyinstaller 3.3 这有什么不对吗?
答案 0 :(得分:1)
我能够通过在命令中添加以下选项运行pyinstaller来解决simiar问题:
--hidden-import='PIL._tkinter_finder'
您的命令应如下所示:
pyinstaller module.py --hidden-import='PIL._tkinter_finder'