我尝试冻结Windows10上的PyQt应用程序并遇到一些麻烦。 我承认我不习惯在Windows上进行开发。 我首先开始安装python-3.6.6-amd64.exe
然后在控制台中,我运行了一些命令来检查pyqt5,pywin32和pip是否最新。
C:\Users\jaaf\beer\EasyBeer>python -m pip install -U pip
Requirement already up-to-date: pip in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (10.0.1)
C:\Users\jaaf\beer\EasyBeer>python -m pip install -U pywin32
Requirement already up-to-date: pywin32 in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (223)
C:\Users\jaaf\beer\EasyBeer>python -m pip install -U pyinstaller
Requirement already up-to-date: pyinstaller in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (3.3.1)
Requirement not upgraded as not directly required: setuptools in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (from pyinstaller) (39.0.1)
Requirement not upgraded as not directly required: pefile>=2017.8.1 in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (from pyinstaller) (2017.11.5)
Requirement not upgraded as not directly required: macholib>=1.8 in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (from pyinstaller) (1.9)
Requirement not upgraded as not directly required: future in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (from pyinstaller) (0.16.0)
Requirement not upgraded as not directly required: altgraph>=0.15 in c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages (from macholib>=1.8->pyinstaller) (0.15)
之后,我运行pyinstaller
C:\Users\jaaf\beer\EasyBeer>pyinstaller -windowed src\main.py
140 INFO: PyInstaller: 3.3.1
140 INFO: Python: 3.6.6
140 INFO: Platform: Windows-10-10.0.17134-SP0
140 INFO: wrote C:\Users\jaaf\beer\EasyBeer\main.spec
140 INFO: UPX is not available.
140 INFO: Extending PYTHONPATH with paths
['C:\\Users\\jaaf\\beer\\EasyBeer\\src', 'C:\\Users\\jaaf\\beer\\EasyBeer']
140 INFO: checking Analysis
156 INFO: checking PYZ
187 INFO: checking PKG
187 INFO: Bootloader c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
187 INFO: checking EXE
187 INFO: Building EXE because out00-EXE.toc is non existent
187 INFO: Building EXE from out00-EXE.toc
281 INFO: SRCPATH [('ndowed', None)]
281 INFO: Updating icons from ndowed to C:\Users\jaaf\AppData\Local\Temp\tmpypl6mv_4
Traceback (most recent call last):
File "C:\Users\jaaf\AppData\Local\Programs\Python\Python36\Scripts\pyinstaller-script.py", line 11, in <module>
load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\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\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 26, in <module>
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\api.py", line 420, in __init__
self.__postinit__()
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
self.assemble()
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\api.py", line 509, in assemble
icon.CopyIcons(tmpnm, self.icon)
File "c:\users\jaaf\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\utils\win32\icon.py", line 173, in CopyIcons
hsrc = win32api.LoadLibraryEx(srcpath, 0, LOAD_LIBRARY_AS_DATAFILE)
pywintypes.error: (2, 'LoadLibraryEx', 'Le fichier spécifié est introuvable.')
C:\Users\jaaf\beer\EasyBeer>
英语翻译
pywintypes.error: (2, 'LoadLibraryEx', 'The specified file could not be found.')
我不明白我得到的错误以及该怎么办。 有关信息,该应用程序在目标系统上运行良好。