小编Tba*_*ker的帖子

Pyinstaller编译为exe

我试图将一个Kivy应用程序编译到一个Windows exe,但我一直收到一个属性错误:AttributeError:'str'对象没有属性'items'

我编译了其他应用程序,并按照kivy页面的说明行(完成演示),但当我尝试对我的应用程序执行相同操作时,我收到上述错误.我不知道该去哪里我已经尝试了好几个小时了,我似乎无法取得任何进展.任何帮助将不胜感激.

编辑:下面是堆栈跟踪的尾部,整个事情很长,所以我粘贴在我认为可能相关的内容中,但坦率地说,我有点超出我的深度:)

6363 WARNING: stderr:   File "c:\python27\lib\site-packages\PyInstaller\depend\a
nalysis.py", line 198, in _safe_import_module
     hook_module.pre_safe_import_module(hook_api)
6375 WARNING: stderr:     hook_module.pre_safe_import_module(hook_api)
   File "c:\python27\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\
hook-six.moves.py", line 55, in pre_safe_import_module
6378 WARNING: stderr:   File "c:\python27\lib\site-packages\PyInstaller\hooks\pr
e_safe_import_module\hook-six.moves.py", line 55, in pre_safe_import_module
     for real_module_name, six_module_name in real_to_six_module_name.items():
6388 WARNING: stderr:     for real_module_name, six_module_name in real_to_six_m
odule_name.items():
 AttributeError: 'str' object has no attribute 'items'
6396 WARNING: stderr: AttributeError: 'str' object has no attribute 'items'
Run Code Online (Sandbox Code Playgroud)

我的规格:

# -*- mode: python -*-
from kivy.deps import sdl2, glew …
Run Code Online (Sandbox Code Playgroud)

python windows pyinstaller

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

pyinstaller ×1

python ×1

windows ×1