当前位置:   article > 正文

【Python工作随笔】pyinstaller:IndexError: tuple index out of range_pyinstaller indexerror: tuple index out of range

pyinstaller indexerror: tuple index out of range

提问

在使用pyinstaller对PyQt应用程序打包的时候会出现 pyinstaller:IndexError: tuple index out of range

File "H:\MyGitProject\GUI\PyQt6\PyQt-Fluent-Widgets\PyQt\lib\dis.py", line 292, in _get_const_info argval = const_list[const_index] IndexError: tuple index out of range

当前python环境3.10 PyInstaller版本5.1。

解答

官方文档说PyInstaller已经支持3.7之后的python版本,但在运行过程中还是遇到,IndexError: tuple index out of range问题。

编辑python3\Lib下的dis.py文件。

找到def _unpack_opargs(code)函数,在语句中添加extended_arg=0,如下图所示。

在这里插入图片描述
然后就可以打包了。

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/861439
推荐阅读
相关标签
  

闽ICP备14008679号