@
Hopetree 添加-i 选项后就是这个错误:
38771 INFO: Updating icons from ['bb.ico'] to C:\Users\ADMINI~1\AppData\Local\Temp\tmpijoxn4qa
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\Scripts\
pyinstaller-script.py", line 9, in <module>
load_entry_point('PyInstaller==3.4.dev0+31785ca87', 'console_scripts', 'pyinstaller')()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\
__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\
__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\building\
build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\building\
build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 26, in <module>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\building\
api.py", line 420, in __init__
self.__postinit__()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\building\
datastruct.py", line 161, in __postinit__
self.assemble()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\building\
api.py", line 509, in assemble
icon.CopyIcons(tmpnm, self.icon)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\utils\win32\
icon.py", line 177, in CopyIcons
return CopyIcons_FromIco(dstpath, [srcpath])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\utils\win32\
icon.py", line 134, in CopyIcons_FromIco
for i, f in enumerate(icons):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\pyinstaller-3.4.dev0+31785ca87-py3.5.egg\PyInstaller\utils\win32\
icon.py", line 107, in __init__
file.seek(e.dwImageOffset, 0)
OSError: [Errno 22] Invalid argument
不添加 -i 可以成功打包 尽管有很多警告信息