Исмаил Галаев
Member
Скомпилировал код Python в exe с помощью ввода команды "pyinstaller -F main.py" в командную строку. После компиляции создались файлы с папками, как и должно быть, кроме самого необходимого exe файла в папке "dist". Папка, как вы поняли, пустая. Надеюсь на вашу помощь!
# pyinstaller -F main.py
120 INFO: PyInstaller: 3.5
120 INFO: Python: 3.8.1
130 INFO: Platform: Windows-7-6.1.7601-SP1
130 INFO: wrote E:\И\Python\В разработке\main.spec
130 INFO: UPX is not available.
180 INFO: Extending PYTHONPATH with paths
['E:\\И\\Python\\В разработке', 'E:\\И\\Python\\В разработке']
180 INFO: checking Analysis
180 INFO: Building Analysis because Analysis-00.toc is non existent
180 INFO: Initializing module dependency graph...
190 INFO: Initializing module graph hooks...
190 INFO: Analyzing base_library.zip ...
6475 INFO: Processing pre-find module path hook distutils
10242 INFO: running Analysis Analysis-00.toc
10282 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\dj_06\appdata\local\programs\python\python38-32\python.exe
10822 INFO: Caching module hooks...
10832 INFO: Analyzing E:\И\Python\В разработке\main.py
10842 INFO: Loading module hooks...
10842 INFO: Loading module hook "hook-distutils.py"...
10852 INFO: Loading module hook "hook-encodings.py"...
10994 INFO: Loading module hook "hook-lib2to3.py"...
10994 INFO: Loading module hook "hook-pydoc.py"...
11004 INFO: Loading module hook "hook-sysconfig.py"...
11004 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
11004 INFO: Loading module hook "hook-xml.py"...
11114 INFO: Loading module hook "hook-_tkinter.py"...
11324 INFO: checking Tree
11324 INFO: Building Tree because Tree-00.toc is non existent
11324 INFO: Building Tree Tree-00.toc
11514 INFO: checking Tree
11514 INFO: Building Tree because Tree-01.toc is non existent
11514 INFO: Building Tree Tree-01.toc
11604 INFO: Looking for ctypes DLLs
11684 INFO: Analyzing run-time hooks ...
11694 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
11704 INFO: Including run-time hook 'pyi_rth__tkinter.py'
11724 INFO: Looking for dynamic libraries
12166 INFO: Looking for eggs
12166 INFO: Using Python library c:\users\dj_06\appdata\local\programs\python\python38-32\python38.dll
12166 INFO: Found binding redirects:
[]
12186 INFO: Warnings written to E:\И\Python\В разработке\build\main\warn-main.txt
12373 INFO: Graph cross-reference written to E:\И\Python\В разработке\build\main\xref-main.html
12473 INFO: checking PYZ
12473 INFO: Building PYZ because PYZ-00.toc is non existent
12473 INFO: Building PYZ (ZlibArchive) E:\И\Python\В разработке\build\main\PYZ-00.pyz
Traceback (most recent call last):
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\DJ_06\AppData\Local\Programs\Python\Python38-32\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\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\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "E:\И\Python\В разработке\main.spec", line 18, in <module>
pyz = PYZ(a.pure, a.zipped_data,
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
self.__postinit__()
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
self.code_dict = {
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
key: strip_paths_in_code(code)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
consts = tuple(
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
strip_paths_in_code(const_co, new_filename)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
120 INFO: PyInstaller: 3.5
120 INFO: Python: 3.8.1
130 INFO: Platform: Windows-7-6.1.7601-SP1
130 INFO: wrote E:\И\Python\В разработке\main.spec
130 INFO: UPX is not available.
180 INFO: Extending PYTHONPATH with paths
['E:\\И\\Python\\В разработке', 'E:\\И\\Python\\В разработке']
180 INFO: checking Analysis
180 INFO: Building Analysis because Analysis-00.toc is non existent
180 INFO: Initializing module dependency graph...
190 INFO: Initializing module graph hooks...
190 INFO: Analyzing base_library.zip ...
6475 INFO: Processing pre-find module path hook distutils
10242 INFO: running Analysis Analysis-00.toc
10282 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\dj_06\appdata\local\programs\python\python38-32\python.exe
10822 INFO: Caching module hooks...
10832 INFO: Analyzing E:\И\Python\В разработке\main.py
10842 INFO: Loading module hooks...
10842 INFO: Loading module hook "hook-distutils.py"...
10852 INFO: Loading module hook "hook-encodings.py"...
10994 INFO: Loading module hook "hook-lib2to3.py"...
10994 INFO: Loading module hook "hook-pydoc.py"...
11004 INFO: Loading module hook "hook-sysconfig.py"...
11004 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
11004 INFO: Loading module hook "hook-xml.py"...
11114 INFO: Loading module hook "hook-_tkinter.py"...
11324 INFO: checking Tree
11324 INFO: Building Tree because Tree-00.toc is non existent
11324 INFO: Building Tree Tree-00.toc
11514 INFO: checking Tree
11514 INFO: Building Tree because Tree-01.toc is non existent
11514 INFO: Building Tree Tree-01.toc
11604 INFO: Looking for ctypes DLLs
11684 INFO: Analyzing run-time hooks ...
11694 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
11704 INFO: Including run-time hook 'pyi_rth__tkinter.py'
11724 INFO: Looking for dynamic libraries
12166 INFO: Looking for eggs
12166 INFO: Using Python library c:\users\dj_06\appdata\local\programs\python\python38-32\python38.dll
12166 INFO: Found binding redirects:
[]
12186 INFO: Warnings written to E:\И\Python\В разработке\build\main\warn-main.txt
12373 INFO: Graph cross-reference written to E:\И\Python\В разработке\build\main\xref-main.html
12473 INFO: checking PYZ
12473 INFO: Building PYZ because PYZ-00.toc is non existent
12473 INFO: Building PYZ (ZlibArchive) E:\И\Python\В разработке\build\main\PYZ-00.pyz
Traceback (most recent call last):
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\DJ_06\AppData\Local\Programs\Python\Python38-32\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\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\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "E:\И\Python\В разработке\main.spec", line 18, in <module>
pyz = PYZ(a.pure, a.zipped_data,
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
self.__postinit__()
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
self.code_dict = {
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
key: strip_paths_in_code(code)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
consts = tuple(
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
strip_paths_in_code(const_co, new_filename)
File "c:\users\dj_06\appdata\local\programs\python\python38-32\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
Последнее редактирование: