快盘下载:好资源、好软件、快快下载吧!

快盘排行|快盘最新

当前位置:首页软件教程电脑软件教程 → python使用pyinstaller生成exe时报错-TypeError:-an-integer-is-required-(got-type-bytes)

python使用pyinstaller生成exe时报错-TypeError:-an-integer-is-required-(got-type-bytes)

时间:2022-09-28 11:41:39人气:作者:快盘下载我要评论

python使用pyinstaller生成exe时报错;

python使用pyinstaller生成exe时报错-TypeError:-an-integer-is-required-(got-type-bytes)

 Traceback (most recent call last):
  File ;D:Program Files (x86)anacondaenvsenv_dalib unpy.py;, line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File ;D:Program Files (x86)anacondaenvsenv_dalib unpy.py;, line 87, in _run_code
    exec(code, run_globals)
  File ;D:Program Files (x86)anacondaenvsenv_daScripTSPyinstaller.exe__main__.py;, line 7, in <module>
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstaller__main__.py;, line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstaller__main__.py;, line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildinguild_main.py;, line 838, in main
    build(specfile, kw.get(;distpath;), kw.get(;workpath;), kw.get(;clean_build;))
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildinguild_main.py;, line 784, in build
    exec(text, spec_namespace)
  File ;<string>;, line 18, in <module>
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingapi.py;, line 98, in __init__
    self.__postinit__()
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingdatastruct.py;, line 158, in __postinit__
    self.assemble()
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingapi.py;, line 128, in assemble
    self.code_dict = {
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingapi.py;, line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingutils.py;, line 654, in strip_paths_in_code
    consts = tuple(
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingutils.py;, line 655, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File ;D:Program Files (x86)anacondaenvsenv_dalibsite-packagesPyInstalleruildingutils.py;, line 662, 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)

解决方法;

更新一下pyinstaller;pip install --upgrade pyinstaller

更新后再次打包;pyinstaller -F main.py

出现如图错误;根据提示继续执行;pip install tinyaes

再次进行打包;pyinstaller -F main.py

TypeError:

成功打包exe文件。 

相关文章

网友评论

快盘下载暂未开通留言功能。

关于我们| 广告联络| 联系我们| 网站帮助| 免责声明| 软件发布

Copyright 2019-2029 【快快下载吧】 版权所有 快快下载吧 | 豫ICP备10006759号公安备案:41010502004165

声明: 快快下载吧上的所有软件和资料来源于互联网,仅供学习和研究使用,请测试后自行销毁,如有侵犯你版权的,请来信指出,本站将立即改正。