解决方案 | python打包 10\lib\dis.py", line 292, in _get_const_info argval = const_list[const_index] IndexError: tuple index out of range
出错“tuple index out of range”

这是一个与 Python 3.10 版本相关的问题。要解决这个问题,你需要进入“Python310\Lib”文件夹,并编辑文件“dis.py”。在“dis.py”文件中,找到“def _unpack_opargs”这一行,在“else”语句内部添加一行代码:“extended_arg = 0”,然后保存文件即可。
I did something like that:
我也做过类似的事情:
else:
arg = None
extended_arg = 0
yield (i, op, arg)
and everything is working fine now.
现在,所有的设备都运行正常了。
参考资料:

浙公网安备 33010602011771号