(myenv) PS D:\PythonItem> pyinstaller -F -w -i icon.ico 午夜赛出战.py
67 INFO: PyInstaller: 6.17.0, contrib hooks: 2025.10
68 INFO: Python: 3.14.0
80 INFO: Platform: Windows-10-10.0.19045-SP0
80 INFO: Python environment: D:\PythonItem\.venv
81 INFO: wrote D:\PythonItem\午夜赛出战.spec
83 INFO: Module search paths (PYTHONPATH):
['D:\\PythonItem\\.venv\\Scripts\\pyinstaller.exe',
'D:\\PythonItem\\.venv\\Scripts\\python314.zip',
'D:\\Python\\DLLs',
'D:\\Python\\Lib',
'D:\\Python',
'D:\\PythonItem\\.venv',
'D:\\PythonItem\\.venv\\Lib\\site-packages',
'D:\\PythonItem']
274 INFO: checking Analysis
274 INFO: Building Analysis because Analysis-00.toc is non existent
274 INFO: Looking for Python shared library...
275 INFO: Using Python shared library: D:\PythonItem\.venv\Scripts\python314.dll
275 INFO: Running Analysis Analysis-00.toc
275 INFO: Target bytecode optimization level: 0
275 INFO: Initializing module dependency graph...
276 INFO: Initializing module graph hook caches...
284 INFO: Analyzing modules for base_library.zip ...
1116 INFO: Processing standard module hook 'hook-encodings.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
1374 INFO: Processing standard module hook 'hook-pickle.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
1599 INFO: Processing standard module hook 'hook-difflib.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
1607 INFO: Processing standard module hook 'hook-heapq.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
3210 INFO: Caching module dependency graph...
3231 INFO: Analyzing D:\PythonItem\午夜赛出战.py
3243 INFO: Processing standard module hook 'hook-idlelib.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
3287 INFO: Processing pre-find-module-path hook 'hook-tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path'
3287 INFO: TclTkInfo: initializing cached Tcl/Tk info...
3516 INFO: Processing standard module hook 'hook-_tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
3777 INFO: Processing standard module hook 'hook-multiprocessing.util.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
3849 INFO: Processing standard module hook 'hook-xml.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
4022 INFO: Processing standard module hook 'hook-_ctypes.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
4364 INFO: Processing standard module hook 'hook-platform.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
4558 INFO: Processing standard module hook 'hook-sysconfig.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
4615 INFO: Processing standard module hook 'hook-setuptools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
4616 INFO: SetuptoolsInfo: initializing cached setuptools info...
6530 INFO: Processing pre-safe-import-module hook 'hook-distutils.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6552 INFO: Processing pre-safe-import-module hook 'hook-jaraco.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6553 INFO: Setuptools: 'jaraco' appears to be a full setuptools-vendored copy - creating alias to 'setuptools._vendor.jaraco'!
6559 INFO: Processing pre-safe-import-module hook 'hook-more_itertools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6559 INFO: Setuptools: 'more_itertools' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.more_itertools'!
6633 INFO: Processing pre-safe-import-module hook 'hook-typing_extensions.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6633 INFO: Setuptools: 'typing_extensions' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.typing_extensions'!
6752 INFO: Processing pre-safe-import-module hook 'hook-packaging.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6868 INFO: Processing standard module hook 'hook-setuptools._vendor.jaraco.text.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
6868 INFO: Processing pre-safe-import-module hook 'hook-importlib_resources.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6874 INFO: Processing pre-safe-import-module hook 'hook-backports.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6874 INFO: Setuptools: 'backports' appears to be a full setuptools-vendored copy - creating alias to 'setuptools._vendor.backports'!
6986 INFO: Processing pre-safe-import-module hook 'hook-importlib_metadata.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
6986 INFO: Setuptools: 'importlib_metadata' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.importlib_metadata'!
7007 INFO: Processing standard module hook 'hook-setuptools._vendor.importlib_metadata.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
7008 INFO: Processing pre-safe-import-module hook 'hook-zipp.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
7008 INFO: Setuptools: 'zipp' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.zipp'!
7161 INFO: Processing pre-safe-import-module hook 'hook-tomli.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
7162 INFO: Setuptools: 'tomli' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.tomli'!
7489 INFO: Processing pre-safe-import-module hook 'hook-wheel.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module'
7490 INFO: Setuptools: 'wheel' appears to be a setuptools-vendored copy - creating alias to 'setuptools._vendor.wheel'!
8397 INFO: Processing standard module hook 'hook-openpyxl.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\_pyinstaller_hooks_contrib\\stdhooks'
8450 INFO: Processing standard module hook 'hook-numpy.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
10050 INFO: Processing standard module hook 'hook-xml.etree.cElementTree.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
10279 INFO: Processing standard module hook 'hook-PIL.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
10355 INFO: Processing standard module hook 'hook-PIL.Image.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
10632 INFO: Processing standard module hook 'hook-PIL.ImageFilter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
11069 INFO: Processing module hooks (post-graph stage)...
11275 INFO: Processing standard module hook 'hook-PIL.SpiderImagePlugin.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
11548 INFO: Processing standard module hook 'hook-_tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks'
11558 INFO: Performing binary vs. data reclassification (969 entries)
11649 INFO: Looking for ctypes DLLs
11690 INFO: Analyzing run-time hooks ...
11694 INFO: Including run-time hook 'pyi_rth_inspect.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks'
11696 INFO: Including run-time hook 'pyi_rth_pkgutil.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks'
11697 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks'
11698 INFO: Including run-time hook 'pyi_rth_setuptools.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks'
11699 INFO: Including run-time hook 'pyi_rth__tkinter.py' from 'D:\\PythonItem\\.venv\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks'
11720 INFO: Creating base_library.zip...
11731 INFO: Looking for dynamic libraries
12088 INFO: Extra DLL search directories (AddDllDirectory): ['D:\\PythonItem\\.venv\\Lib\\site-packages\\numpy.libs']
12088 INFO: Extra DLL search directories (PATH): []
12323 INFO: Warnings written to D:\PythonItem\build\午夜赛出战\warn-午夜赛出战.txt
12362 INFO: Graph cross-reference written to D:\PythonItem\build\午夜赛出战\xref-午夜赛出战.html
12383 INFO: checking PYZ
12383 INFO: Building PYZ because PYZ-00.toc is non existent
12383 INFO: Building PYZ (ZlibArchive) D:\PythonItem\build\午夜赛出战\PYZ-00.pyz
12699 INFO: Building PYZ (ZlibArchive) D:\PythonItem\build\午夜赛出战\PYZ-00.pyz completed successfully.
12714 INFO: checking PKG
12714 INFO: Building PKG because PKG-00.toc is non existent
12714 INFO: Building PKG (CArchive) 午夜赛出战.pkg
14785 INFO: Building PKG (CArchive) 午夜赛出战.pkg completed successfully.
14793 INFO: Bootloader D:\PythonItem\.venv\Lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe
14793 INFO: checking EXE
14793 INFO: Building EXE because EXE-00.toc is non existent
14793 INFO: Building EXE from EXE-00.toc
14794 INFO: Copying bootloader EXE to D:\PythonItem\dist\午夜赛出战.exe
14795 INFO: Copying icon to EXE
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\PythonItem\.venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
sys.exit(_console_script_run())
~~~~~~~~~~~~~~~~~~~^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 231, in _console_script_run
run()
~~~^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 215, in run
run_build(pyi_config, spec_file, **vars(args))
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\__main__.py", line 70, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1272, in main
build(specfile, distpath, workpath, clean_build)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\build_main.py", line 1210, in build
exec(code, spec_namespace)
~~~~^^^^^^^^^^^^^^^^^^^^^^
File "D:\PythonItem\午夜赛出战.spec", line 19, in <module>
exe = EXE(
pyz,
...<17 lines>...
icon=['icon.ico'],
)
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 675, in __init__
self.__postinit__()
~~~~~~~~~~~~~~~~~^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
self.assemble()
~~~~~~~~~~~~~^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 788, in assemble
self._retry_operation(icon.CopyIcons, build_name, self.icon)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\api.py", line 1058, in _retry_operation
return func(*args)
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\utils\win32\icon.py", line 206, in CopyIcons
srcpath = normalize_icon_type(srcpath, ("exe", "ico"), "ico", config.CONF["workpath"])
File "D:\PythonItem\.venv\Lib\site-packages\PyInstaller\building\icon.py", line 34, in normalize_icon_type
raise FileNotFoundError(f"Icon input file {icon_path} not found")
FileNotFoundError: Icon input file D:\PythonItem\icon.ico not found什么问题