python打包错误求解
尘日天 2019-10-23 01:16:27 venv) C:\Users\Administrator\PycharmProjects\untitled>pyinstaller -F py.py
43 INFO: PyInstaller: 3.5
44 INFO: Python: 3.8.0
44 INFO: Platform: Windows-10-10.0.17134-SP0
44 INFO: wrote C:\Users\Administrator\PycharmProjects\untitled\py.spec
45 INFO: UPX is not available.
46 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Administrator\\PycharmProjects\\untitled',
'C:\\Users\\Administrator\\PycharmProjects\\untitled']
46 INFO: checking Analysis
103 INFO: checking PYZ
103 INFO: Building PYZ because PYZ-00.toc is non existent
103 INFO: Building PYZ (ZlibArchive) C:\Users\Administrator\PycharmProjects\untitled\build\py\PYZ-00.
pyz
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _ru
n_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run
_code exec(code, run_globals) File "C:\Users\Administrator\PycharmProjects\untitled\venv\Scripts\pyinstaller.exe\__main__.py", li
ne 9, in <module> File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\__main__.p
y", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\__main__.p
y", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\b
uild_main.py", line 844, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\b
uild_main.py", line 791, in build exec(code, spec_namespace) File "C:\Users\Administrator\PycharmProjects\untitled\py.spec", line 18, in <module> pyz = PYZ(a.pure, a.zipped_data, File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a
pi.py", line 98, in __init__ self.__postinit__() File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\d
atastruct.py", line 158, in __postinit__ self.assemble() File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a
pi.py", line 128, in assemble self.code_dict = { File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\a
pi.py", line 129, in <dictcomp> key: strip_paths_in_code(code) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u
tils.py", line 652, in strip_paths_in_code consts = tuple( File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u
tils.py", line 653, in <genexpr> strip_paths_in_code(const_co, new_filename) File "c:\users\administrator\pycharmprojects\untitled\venv\lib\site-packages\PyInstaller\building\u
tils.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)
(venv) C:\Users\Administrator\PycharmProjects\untitled>.co_argcount, co.co_kwonlyargcount, co.co_nloc
als, co.co_stacksize,
'.co_argcount' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
(venv) C:\Users\Administrator\PycharmProjects\untitled>TypeError: an integer is required (got type by
tes)
'TypeError:' 不是内部或外部命令,也不是可运行的程序
或批处理文件。