【以解决】Pyinstaller打包报错IndexError: tuple index out of range

问题

这个问题主要是在Python3.7以上的版本中遇到,用pyinstaller打包的时候发现报错

(pyinstallerEnv) D:\virtualEnv\pyinstallerEnv\Scripts>auto-py-to-exe
pygame 2.5.2 (SDL 2.28.3, Python 3.10.0)
Hello from the pygame community. https://www.pygame.org/contribute.html
12210 ERROR: An error occurred while packaging
Traceback (most recent call last):
  File "D:\1\Python310\lib\site-packages\auto_py_to_exe\packaging.py", line 132, in package
    run_pyinstaller()
  File "D:\1\Python310\lib\site-packages\PyInstaller\__main__.py", line 198, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "D:\1\Python310\lib\site-packages\PyInstaller\__main__.py", line 69, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 1069, in main
    build(specfile, distpath, workpath, clean_build)
  File "D:\1\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 1009, in build
    exec(code, spec_namespace)
  File "C:\Users\admin\AppData\Local\Temp\tmp4_2ywen0\enjoytraderSpider隧道请求代理版本-多进程.spec", line 4, in <module>
    a = Analysis(
  File "D:\1\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 470, in __init__
    self.__postinit__()
  File "D:\1\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 184, in __postinit__
    self.assemble()
  File "D:\1\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 608, in assemble
    priority_scripts.append(self.graph.add_script(script))
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 268, in add_script
    self._top_script_node = super().add_script(pathname)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1260, in add_script
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1332, in import_hook
    target_package, target_module_partname = self._find_head_package(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1511, in _find_head_package
    target_package = self._safe_import_module(
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2369, in _safe_import_hook
    self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1371, in import_hook
    for target_submodule in self._import_importable_package_submodules(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1620, in _import_importable_package_submodules
    submodule = self._safe_import_module(
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1892, in _safe_import_module
    self._process_imports(n)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2703, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 437, in _safe_import_hook
    return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2160, in _safe_import_hook
    target_modules = self.import_hook(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1345, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "D:\1\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 484, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1891, in _safe_import_module
    n = self._scan_code(module, co, co_ast)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2498, in _scan_code
    self._scan_bytecode(
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2602, in _scan_bytecode
    for inst in util.iterate_instructions(module_code_object):
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 44, in iterate_instructions
    yield from iterate_instructions(constant)
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 36, in iterate_instructions
    yield from (i for i in get_instructions(code_object) if i.opname != "EXTENDED_ARG")
  File "D:\1\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 36, in <genexpr>
    yield from (i for i in get_instructions(code_object) if i.opname != "EXTENDED_ARG")
  File "D:\1\Python310\lib\dis.py", line 338, in _get_instructions_bytes
    argval, argrepr = _get_const_info(arg, constants)
  File "D:\1\Python310\lib\dis.py", line 292, in _get_const_info
    argval = const_list[const_index]
IndexError: tuple index out of range

解决方案

找到 /Lib/dis.py文件
找到def _unpack_opargs(code)函数,在else语句中添加extended_arg=0,如下:
在这里插入图片描述

保存即可

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/393365.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

PCIe TX端电容

一、问题&#xff1a;PCIe为什么要加电容 PCIe为什么要加电容&#xff1f;具体的作用是什么&#xff1f; 答&#xff1a;因为PCIe Host和Receiver两端的直流偏置会不一样&#xff0c;所以需要在PCIe的传输路径上加电容&#xff0c;这样传输路径上只有AC信号&#xff0c;不存在…

const--类的常量成员函数

在C中,为了禁止成员函数修改数据成员的值,可以将它设置为常量成员函数。设置常量成员函数的方法是在函数原型的后面加上const,形式如下: class x { …………… T f(t1,t2) const{} ………… }; 常量成员函数的作用&#xff1a; 将成员函数设置为const&#xff0c;表明该成员函…

MySQL跨服务器关联查询

1. 首先确认服务器的Federated引擎是否开启 show engines;修改数据库的配制文件my.ini,(我的my.ini的路径为&#xff1a;D:\ProgramData\MySQL\MySQL Server 5.7/my.ini),将federated添加到my.ini文件中 到MySQL的my.cnf配置文件中修改 在 [mysqld] 下方加入 federated 然后重…

CentOS 7.9如何禁止内核自动更新升级

要在 CentOS 7.9 系统中禁止内核自动更新&#xff0c;你可以通过配置 YUM&#xff08;Yellowdog Updater, Modified&#xff09;来实现。这里有几种方法可以阻止内核自动更新&#xff1a; 方法 1: 使用 exclude 选项在 YUM 配置中 编辑 YUM 的配置文件 /etc/yum.conf&#xff…

[SWPUCTF 2021 新生赛]crypto8

第一眼看见是乱码不确定是什么的编码 看了下感觉是UUencode编码 UUencode编码是一种古老的编码方式&#xff0c;通常用于将二进制数据转换成可打印字符的形式。UUencode编码采用一种基于64个字符的编码表&#xff0c;将每3个字节的数据编码为4个可打印字符&#xff0c;以实现…

C++类和对象——继承详解

目录 1.基本语法 2.继承方式 3.继承中的对象模型 4.构造和构析顺序 5.同名成员处理 6.同名静态成员处理 7.多继承语法 8.菱形继承 图片示例&#xff1a; 虚继承 代码示例&#xff1a; 1.基本语法 #include<bits/stdc.h> using namespace std;//公共页面类 …

心法利器[107] onnx和tensorRT的bert加速方案记录

心法利器 本栏目主要和大家一起讨论近期自己学习的心得和体会&#xff0c;与大家一起成长。具体介绍&#xff1a;仓颉专项&#xff1a;飞机大炮我都会&#xff0c;利器心法我还有。 2023年新一版的文章合集已经发布&#xff0c;获取方式看这里&#xff1a;又添十万字-CS的陋室2…

深度学习基础之《TensorFlow框架(4)—Operation》

一、常见的OP 1、举例 类型实例标量运算add&#xff0c;sub&#xff0c;mul&#xff0c;div&#xff0c;exp&#xff0c;log&#xff0c;greater&#xff0c;less&#xff0c;equal向量运算concat&#xff0c;slice&#xff0c;splot&#xff0c;canstant&#xff0c;rank&am…

Sora OpenAI 101教程(一):从文本生成令人兴奋的视频的 AI 模型

想象一下&#xff0c;您可以通过简单的文本提示创建令人惊叹的视频&#xff0c;例如“一个人带着狗在月球上行走”。听起来不可能&#xff0c;对吧&#xff1f;好吧&#xff0c;现在不再这样了&#xff0c;感谢 OpenAI 的最新人工智能模型 Sora&#xff0c;它可以从文本生成令人…

基于QEMU的vexpress-a9的初始化代码运行(二)

这个part是想详细走读一下用qemu运行kernel的最初始代码&#xff0c;也就是使用qemu运行kernel代码的详细逻辑&#xff0c;从qemu加载根目录下vmlinux镜像的逻辑&#xff0c;也就是运行arch/arm/kernel/head.S的整个过程&#xff0c;直到跳转到start_kernel&#xff0c;使用的k…

GraphPad Prism 10.2.0 for Mac 强大实用的医学绘图分析工具

GraphPad Prism GraphPad Prism是一款非常实用的统计软件&#xff0c;其功能非常强大&#xff0c;能够帮助用户进行各类科研数据的处理和分析&#xff0c;快速绘制出各种专业的图像和数据报告。 GraphPad Prism软件的用户界面非常友好&#xff0c;易于学习和操作&#xff0c;…

通过前序和中序遍历结果构造二叉树

题目 105. 从前序与中序遍历序列构造二叉树 - 力扣&#xff08;LeetCode&#xff09; 思路 首先思考&#xff0c;根节点应该做什么。 肯定要想办法确定根节点的值&#xff0c;把根节点做出来&#xff0c;然后递归构造左右子树即可。 我们先来回顾一下&#xff0c;前序遍历和…

使用MinIO S3存储桶备份Weaviate

Weaviate 是一个开创性的开源向量数据库&#xff0c;旨在通过利用机器学习模型来增强语义搜索。与依赖关键字匹配的传统搜索引擎不同&#xff0c;Weaviate 采用语义相似性原则。这种创新方法将各种形式的数据&#xff08;文本、图像等&#xff09;转换为矢量表示形式&#xff0…

分享一下,程序员为什么不喜欢关电脑?(个人观点仅供娱乐哈哈哈)

你是否曾经疑惑&#xff0c;为何身边的程序员朋友总是让电脑保持开机状态&#xff0c;仿佛与它们有着不解之缘&#xff1f;别急着给他们贴上“电脑迷”的标签&#xff0c;背后其实隐藏着许多合理的原因。今天&#xff0c;就让我们一同走进程序员的世界&#xff0c;探究他们为何…

My desktop didn‘t come with the Bluetooth.

You didnt turn on the Bluetooth on PC and phone.Turn on it to control your phone. My desktop didnt come with the Bluetooth. 电脑控制手机的时候&#xff0c;电脑蓝牙没打开 电脑蓝牙打开步骤 电脑蓝牙的小图标打开了 手机上可以看到计算机了【Thinkpad-T440p-zwf】 无…

transformer图像切块与还原(window_partition+window_unpartition)

文章目录 前言一、切割图像(window_partition)二、还原图像(window_unpartition)三、整体代码 前言 假如b ,h,w,c(3,32,32,768)需将h w按照14尺寸切割&#xff0c;32/14无法整除&#xff0c;需pad为(3,42,42,768)完成固定尺寸块切割&#xff0c;进而完成transformer结构&#…

java数据结构与算法刷题-----LeetCode150. 逆波兰表达式求值

java数据结构与算法刷题目录&#xff08;剑指Offer、LeetCode、ACM&#xff09;-----主目录-----持续更新(进不去说明我没写完)&#xff1a;https://blog.csdn.net/grd_java/article/details/123063846 解题思路 本题也叫后缀表达式&#xff0c;更利于机器处理题目给出的案例都…

Find My资讯|苹果Vision Pro无法通过Find My进行远程定位和发声

苹果 Vision Pro 头显现在已经正式开售&#xff0c;不过根据该公司日前发布的支持文件&#xff0c;这款头显目前缺乏一系列关键查找功能&#xff0c;用户无法在 iCloud 网站或Find My应用中获悉头显的位置&#xff0c;也无法让这款头显远程播放声音。 不过支持文件同时提到 V…

【快速解决】python项目打包成exe文件——vscode软件

目录 操作步骤 1、打开VSCode并打开你的Python项目。 2、在VSCode终端中安装pyinstaller&#xff1a; 3、运行以下命令使用pyinstaller将Python项目打包成exe文件&#xff1a; 其中your_script.py是你的Python脚本的文件名。 4、打包完成后&#xff0c;在你的项目目录中会…

多线程---线程同步,线程通信

线程同步 1.概述 线程同步是多线程编程中的一个重要概念&#xff0c;它指的是在多线程环境中&#xff0c;通过一定的机制保证多个线程按照某种特定的方式正确、有序地执行。这主要是为了避免并发问题&#xff0c;如死锁、竞态条件、资源争用等&#xff0c;确保数据的一致性和完…