问题
这个问题主要是在Python3.7以上的版本中遇到,用pyinstaller打包的时候发现报错
/usr/local/lib/python3.10/dis.py
argval = const_list[const_index],
IndexError: tuple index out of range
解决方案
vim 进入报错的文件,/usr/local/lib/python3.10/dis.py
找到def _unpack_opargs(code)函数,在else语句中添加extended_arg=0,如下:
![在这里插入图片描述](https://img-blog.csdnimg.cn/822941e13430488bb9abfd8a6337c99c.png)
退出文件,保存即可