![Tuple index out of range](https://kumkoniak.com/108.jpg)
cx_Freeze or PyInstaller.Īt time of writing, the latest python-version is 3.8 and py2exe works until python-3.4.
![tuple index out of range tuple index out of range](https://blog.finxter.com/wp-content/uploads/2020/05/image-76-300x120.png)
I think it’s safe to say the project is abandoned find other options, e.g. Update: At this point (November 2019), it’s been over five years since the last py2exe release, and by the beginning of 2020 (when Python 2 support lapses completely), it will not run on any supported version of Python (3.4 is already out of support). The bytecode often changes in small ways from version to version that could break even Python 3.5 (given only 3.3 and 3.4 support is claimed explicitly), but 3.6 is 100% guaranteed to fail. The failure you’re seeing occurs in py2exe opcode parsing code, which, given the most recent posted version of py2exe only claims support for 3.3 and 3.4, could not possibly have knowledge of, or support for, the new wordcode opcodes they hadn’t even been conceived of at the time py2exe was last updated. Python 3.6 completely redesigned the bytecode for CPython (it’s not a “byte” code at all anymore, it’s a wordcode, where all opcodes are two bytes wide instead of 1-3). Original Answer before py2exe 0.10 release As long as you upgrade to an appropriate py2exe version ( 0.10 and higher), this problem should not occur. py2exe released new versions in October and November of 2020, supporting 3.5-3.8 in 0.10.0.2 and adding 3.9 support in 0.10.1.0 (dropping support for 3.4 and earlier).
![tuple index out of range tuple index out of range](https://i.imgur.com/VGWRTiL.jpg)
![tuple index out of range tuple index out of range](https://i.stack.imgur.com/aQpxy.jpg)
The output produces the error: Inde圎rror: tuple index out of rangeīelow you can find the cmd output: C:Python36>python setup.py py2exeįile "C:Python36libdistutilscore.py", line 148, in setupįile "C:Python36libdistutilsdist.py", line 955, in run_commandsįile "C:Python36libdistutilsdist.py", line 974, in run_commandįile "C:Python36libsite-packagespy2exedistutils_buildexe.py", line 188, in runįile "C:Python36libsite-packagespy2exedistutils_buildexe.py", line 267, in _runįile "C:Python36libsite-packagespy2exeruntime.py", line 160, in analyzeįile "C:Python36libsite-packagespy2exemf3.py", line 120, in import_hookįile "C:Python36libsite-packagespy2exemf3.py", line 274, in _gcd_importįile "C:Python36libsite-packagespy2exemf3.py", line 357, in _find_and_loadįile "C:Python36libsite-packagespy2exemf3.py", line 388, in _scan_codeįor what, args in self._scan_opcodes(code):įile "C:Python36libsite-packagespy2exemf3.py", line 417, in _scan_opcodesĮdit: here is the setup.py file: from re import setupĪpparently my pessimism a year ago (see “Update” at bottom of original post) was unwarranted.
![tuple index out of range tuple index out of range](https://user-images.githubusercontent.com/14349360/36949308-67c7280a-2021-11e8-9fac-b56631f8ce74.png)
The script I’m using imports openpyxl and pptx and runs fine when I use Pycharm or run the script using the command window. I’m currently trying to make an executable using py2exe.
![Tuple index out of range](https://kumkoniak.com/108.jpg)