C:\Users\User\PycharmProjects\data>pyinstaller -F data1.spec
220 INFO: PyInstaller: 4.10
220 INFO: Python: 3.6.6
220 INFO: Platform: Windows-8.1-6.3.9600-SP0
230 INFO: UPX is not available.
230 INFO: Extending PYTHONPATH with paths
['C:\\Users\\User\\PycharmProjects\\data']
840 INFO: checking Analysis
840 INFO: Building Analysis because Analysis-00.toc is non existent
840 INFO: Initializing module dependency graph...
850 INFO: Caching module graph hooks...
890 INFO: Analyzing base_library.zip ...
6201 INFO: Caching module dependency graph...
6491 INFO: running Analysis Analysis-00.toc
6501 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of f
inal executable
required by c:\users\user\appdata\local\programs\python\python36\python.exe
6881 INFO: Analyzing data1.py
8197 INFO: Processing pre-find module path hook distutils from 'c:\\users\\user\
\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\ho
oks\\pre_find_module_path\\hook-distutils.py'.
8208 INFO: distutils: retargeting to non-venv dir 'c:\\users\\user\\appdata\\loc
al\\programs\\python\\python36\\lib'
10276 INFO: Processing pre-find module path hook site from 'c:\\users\\user\\app
data\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\\hooks\
\pre_find_module_path\\hook-site.py'.
10276 INFO: site: retargeting to fake-dir 'c:\\users\\user\\appdata\\local\\prog
rams\\python\\python36\\lib\\site-packages\\PyInstaller\\fake-modules'
13006 INFO: Processing pre-safe import module hook setuptools.extern.six.moves f
rom 'c:\\users\\user\\appdata\\local\\programs\\python\\python36\\lib\\site-pack
ages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.mov
es.py'.
21062 INFO: Processing pre-safe import module hook six.moves from 'c:\\users\\us
er\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\PyInstaller\
\hooks\\pre_safe_import_module\\hook-six.moves.py'.
26659 INFO: Processing module hooks...
26659 INFO: Loading module hook 'hook-faker.py' from 'c:\\users\\user\\appdata\\
local\\programs\\python\\python36\\lib\\site-packages\\_pyinstaller_hooks_contri
b\\hooks\\stdhooks'...
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'text_unidecode'
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\utils\hooks\__init__.py", line 366, in get_module_file_attribute
attr = loader.get_filename(package)
AttributeError: 'NoneType' object has no attribute 'get_filename'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\depend\imphook.py", line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_f
ilename)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\compat.py", line 641, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 399, in _check_name_wrappe
r
File "<frozen importlib._bootstrap_external>", line 823, in load_module
File "<frozen importlib._bootstrap_external>", line 682, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\_
pyinstaller_hooks_contrib\hooks\stdhooks\hook-faker.py", line 17, in <module>
collect_data_files('text_unidecode') + # noqa: W504
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\utils\hooks\__init__.py", line 723, in collect_data_files
pkg_base, pkg_dir = get_package_paths(package)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\utils\hooks\__init__.py", line 518, in get_package_paths
file_attr = get_module_file_attribute(package)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\utils\hooks\__init__.py", line 383, in get_module_file_attribute
raise ImportError('Unable to load module attribute') from e
ImportError: Unable to load module attribute
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python36\lib\runpy.py", line
193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\user\appdata\local\programs\python\python36\lib\runpy.py", line
85, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\Scripts\pyinstaller
.exe\__main__.py", line 7, in <module>
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\__main__.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\__main__.py", line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\building\build_main.py", line 803, in main
build(specfile, distpath, workpath, clean_build)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\building\build_main.py", line 725, in build
exec(code, spec_namespace)
File "data1.spec", line 20, in <module>
noarchive=False)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\building\build_main.py", line 277, in __init__
self.__postinit__()
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\building\datastruct.py", line 155, in __postinit__
self.assemble()
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\building\build_main.py", line 445, in assemble
self.graph.process_post_graph_hooks(self)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\depend\analysis.py", line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\depend\imphook.py", line 398, in post_graph
self._load_hook_module()
File "c:\users\user\appdata\local\programs\python\python36\lib\site-packages\P
yInstaller\depend\imphook.py", line 364, in _load_hook_module
raise ImportErrorWhenRunningHook(self.hook_module_name, self.hook_filename)
PyInstaller.exceptions.ImportErrorWhenRunningHook: Failed to import module __PyI
nstaller_hooks_0_faker required by hook for module c:\users\user\appdata\local\p
rograms\python\python36\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdho
oks\hook-faker.py. Please check whether module __PyInstaller_hooks_0_faker actua
lly exists and whether the hook is compatible with your version of c:\users\user
\appdata\local\programs\python\python36\lib\site-packages\_pyinstaller_hooks_con
trib\hooks\stdhooks\hook-faker.py: You might want to read more about hooks in th
e manual and provide a pull-request to improve PyInstaller.
C:\Users\User\PycharmProjects\data>

导入的模块有问题 你检查一下你的代码