当我尝试创建EXE时,出现下一个错误:
E:\Programming\Python\Projects\NT\GIT>pyinstaller --noconsole UserGUI.py
100 INFO: PyInstaller: 3.3.1
100 INFO: Python: 3.6.6rc1
101 INFO: Platform: Windows-10-10.0.17134-SP0
102 INFO: wrote E:\Programming\Python\Projects\NT\GIT\UserGUI.spec
104 INFO: UPX is not available.
105 INFO: Extending PYTHONPATH with paths
['E:\\Programming\\Python\\Projects\\NT\\GIT',
'E:\\Programming\\Python\\Projects\\NT\\GIT']
105 INFO: checking Analysis
106 INFO: Building Analysis because out00-Analysis.toc is non existent
106 INFO: Initializing module dependency graph...
108 INFO: Initializing module graph hooks...
111 INFO: Analyzing base_library.zip ...
3721 INFO: running Analysis out00-Analysis.toc
3729 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\program files\python36\python.exe
3780 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files\python36\python.exe
3831 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files\python36\python.exe
3878 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files\python36\python.exe
3922 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files\python36\python.exe
3967 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files\python36\python.exe
4017 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files\python36\VCRUNTIME140.dll
4062 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files\python36\VCRUNTIME140.dll
4109 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files\python36\VCRUNTIME140.dll
4153 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files\python36\VCRUNTIME140.dll
4198 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files\python36\VCRUNTIME140.dll
4381 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4429 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4473 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4518 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4564 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4609 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4660 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4703 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4748 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4796 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4843 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4887 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\program files\python36\python36.dll
4889 INFO: Caching module hooks...
4895 INFO: Analyzing E:\Programming\Python\Projects\NT\GIT\UserGUI.py
5200 INFO: Processing pre-safe import module hook win32com
5236 INFO: Processing pre-find module path hook distutils
6548 INFO: Loading module hooks...
6548 INFO: Loading module hook "hook-distutils.py"...
6549 INFO: Loading module hook "hook-encodings.py"...
6645 INFO: Loading module hook "hook-pydoc.py"...
6646 INFO: Loading module hook "hook-pythoncom.py"...
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\utils\win32\winutils.py", line 103, in import_pywin32_module
name=module_name, globals={}, locals={}, fromlist=[''])
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\pythoncom.py", line 2, in <module>
import pywintypes
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32\lib\pywintypes.py", line 136, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32\lib\pywintypes.py", line 64, in __import_pywin32_system_module__
import _win32sysloader
ImportError: DLL load failed: %1 не является приложением Win32.
7362 INFO: Loading module hook "hook-pywintypes.py"...
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\utils\win32\winutils.py", line 103, in import_pywin32_module
name=module_name, globals={}, locals={}, fromlist=[''])
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32\lib\pywintypes.py", line 136, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32\lib\pywintypes.py", line 64, in __import_pywin32_system_module__
import _win32sysloader
ImportError: DLL load failed: %1 не является приложением Win32.
8061 INFO: Loading module hook "hook-win32com.py"...
8130 INFO: Loading module hook "hook-xml.py"...
8401 INFO: Loading module hook "hook-_tkinter.py"...
8450 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\program files\python36\DLLs\_tkinter.pyd
8502 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\program files\python36\DLLs\_tkinter.pyd
8664 INFO: checking Tree
8707 INFO: checking Tree
8746 INFO: Looking for ctypes DLLs
8781 INFO: Analyzing run-time hooks ...
8784 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
8787 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
8789 INFO: Including run-time hook 'pyi_rth__tkinter.py'
8796 INFO: Looking for dynamic libraries
Traceback (most recent call last):
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32ctypes\core\ctypes\_util.py", line 42, in check_null
raise make_error(function, function_name)
OSError: [WinError 2] Не удается найти указанный файл.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python36\Scripts\pyinstaller-script.py", line 11, in <module>
load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\building\build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\building\build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\building\build_main.py", line 213, in __init__
self.__postinit__()
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
self.assemble()
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\building\build_main.py", line 537, in assemble
redirects=self.binding_redirects))
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\depend\bindepend.py", line 222, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\depend\bindepend.py", line 400, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\depend\bindepend.py", line 351, in getAssemblies
res = GetManifestResources(pth)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\utils\win32\winmanifest.py", line 1005, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\PyInstaller\utils\win32\winresource.py", line 168, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "c:\program files\python36\lib\contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Patam\AppData\Roaming\Python\Python36\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryExW', 'Couldn not find the file.')
我已经为这个问题奋斗了三天,无法弄清楚,我该怎么办
很抱歉这个问题是否已经在某个地方回答了,但是我对此无能为力(因为我从那里找不到任何帮助)
p.s不好意思英语