I am trying to compile a Kivy application to a windows exe, but I keep receiving an attribute error: AttributeError: \'str\' object has no attribute \'items\'
I have
I have faced some similar error when I use pyinstaller. And part of my error message are showed following:
File "C:\Python27\lib\site-packages\pyinstaller-3.1.1-py2.7.egg\PyInstaller\depend\analysis.py", line 198, in _safe_import_module
hook_module.pre_safe_import_module(hook_api)
File "C:\Python27\lib\site-packages\pyinstaller-3.1.1-py2.7.egg\PyInstaller\hooks\pre_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():
AttributeError: 'str' object has no attribute 'items'
When I scroll up this message, I found this:
18611 INFO: Processing pre-find module path hook distutils
20032 INFO: Processing pre-safe import module hook _xmlplus
23532 INFO: Processing pre-safe import module hook six.moves
Traceback (most recent call last):
File "<string>", line 2, in <module>
ImportError: No module named six
So I turned to install the module six. And when I installed it, my pyinstaller could run successfully.
Hope this can help you.
Despite upgrading the setuptools
, Uninstalling and reinstalling works for me.
conda uninstall setuptools
and then
conda install setuptools