Pyinstaller打包python exe报错

Pyinstaller打包python exe报错_第1张图片

Traceback (most recent call last):
File “e:\installed\python\anaconda\lib\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “e:\installed\python\anaconda\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "E:\installed\python\anaconda\Scripts\pyinstaller.exe_main
.py", line 7, in
File "e:\installed\python\anaconda\lib\site-packages\PyInstaller_main
.py", line 124, in run
run_build(pyi_config, spec_file, **vars(args))
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller_main_.py”, line 58, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\building\build_main.py”, line 803, in main
build(specfile, distpath, workpath, clean_build)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\building\build_main.py”, line 725, in build
exec(code, spec_namespace)
File “trainval_netv4.spec”, line 19, in
noarchive=False)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\building\build_main.py”, line 277, in init
self.postinit()
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\building\datastruct.py”, line 155, in postinit
self.assemble()
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\building\build_main.py”, line 445, in assemble
self.graph.process_post_graph_hooks(self)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\depend\analysis.py”, line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\depend\imphook.py”, line 398, in post_graph
self._load_hook_module()
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\depend\imphook.py”, line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
File “e:\installed\python\anaconda\lib\site-packages\PyInstaller\compat.py”, line 641, in importlib_load_source
return mod_loader.load_module()
File “

解决方法:
1、降低matploylib版本
2、dialects = eval( dialects.strip().replace("\r\nEnumerateProviders catalog=0\r\r\nEnumerateProviders totalPro=19",""))
3、运行命令 pyinstaller -D py文件名.spec

你可能感兴趣的:(python)