Я пытался построить проект, используя pyinstaller.В проекте используется PyQt5, и я не могу его правильно построить.UPX и питон в моем пути.Я не хочу связываться с какими-либо пакетными файлами Python, поэтому я не уверен, что делать.Вот вывод cmd:
C:\Users\John\Desktop\Project_Convar\LarkEnv>pyinstaller -F myProject.py
60 INFO: PyInstaller: 3.5.dev0+cb8d10af6
61 INFO: Python: 3.6.2
62 INFO: Platform: Windows-10-10.0.17134-SP0
64 INFO: wrote C:\Users\John\Desktop\Project_Convar\LarkEnv\myProject.spec
428 INFO: UPX is available.
429 INFO: Extending PYTHONPATH with paths
['C:\\Users\\John\\Desktop\\Project_Convar\\LarkEnv',
'C:\\Users\\John\\Desktop\\Project_Convar\\LarkEnv']
430 INFO: checking Analysis
461 INFO: checking PYZ
478 INFO: checking PKG
479 INFO: Building because toc changed
479 INFO: Building PKG (CArchive) PKG-00.pkg
483 INFO: Executing - upx --lzma -q
...
execute bunch of upx stuff
...
C:\Users\John\AppData\Roaming\pyinstaller\bincache01_py36_64bit\qt5svg.dll
27209 WARNING: One binary added with two internal names.
27209 WARNING: ('libGLESv2.dll',
'C:\\users\\John\\desktop\\project_convar\\larkenv\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
'BINARY')
27211 WARNING: was placed previously at
27211 WARNING: ('PyQt5\\Qt\\bin\\libGLESv2.dll',
'C:\\users\\John\\desktop\\project_convar\\larkenv\\lib\\site-packages\\PyQt5\\Qt\\bin\\libGLESv2.dll',
'BINARY')
C:\Users\John\AppData\Roaming\pyinstaller\bincache01_py36_64bit\qt5qml.dll
Traceback (most recent call last):
File "c:\users\John\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\John\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\John\AppData\Local\Programs\Python\Python36\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "C:\Users\John\Desktop\Project_Convar\LarkEnv\myProject.spec", line 32, in <module>
console=True )
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\api.py", line 430, in __init__
strip_binaries=self.strip, upx_binaries=self.upx,
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__
self.__postinit__()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\api.py", line 281, in assemble
pylib_name=pylib_name)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\archive\writers.py", line 334, in __init__
super(CArchiveWriter, self).__init__(archive_path, logical_toc)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\archive\writers.py", line 61, in __init__
self._add_from_table_of_contents(logical_toc)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\archive\writers.py", line 86, in _add_from_table_of_contents
self.add(toc_entry) # The guts of the archive.
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\archive\writers.py", line 375, in add
code = get_code_object(nm, pathnm)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\utils.py", line 623, in get_code_object
co = _load_code(modname, filename)
File "c:\users\John\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\building\utils.py", line 580, in _load_code
loader = importer.find_module(modname)
AttributeError: 'NoneType' object has no attribute 'find_module'