Python3.6用Pyinstaller打包的解决办法

xiaoxiao2021-02-28  119

用Pyinstaller3.2.1打包Python3.6的时候遇到了“IndexError: tuple index out of range”的错误提示

之前以为是自己的程序有BUG    后来在网上看到 Pyinstaller3.2.1 现在还并不支持 Python3.6

在网上终于找到了解决办法,如下

找到D:\python\Python36-32\Lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py 路径根据安装目录找,上面是我的安装目录 打开 modulegraph.py 将大约2731附近将 return module_code_object.co_names[co_names_index] 更改为 return co_names_index #coding by rekfan on 2017/03/21 10:40 #return module_code_object.co_names[co_names_index] 重新编译 你就会发现编译成功 INFO: Building EXE from out00-EXE.toc completed successfully.

转载请注明原文地址: https://www.6miu.com/read-24521.html

最新回复(0)