eric6安装插件cx-freeze的问题

时间:2021-09-12 03:36:54


还是Python3.6 pyqt5.8 eric6,安装一个python to exe的工具cx-freeze,然后想在eric6上安装下插件方便操作。

一直在插件状态信息中提示:

                "The cxfreeze.bat executable could not be found."
                "Did you run the cxfreeze-postinstall script?"


解压插件跟踪安装的python类实现,发现是不支持最新的3.5和3.6导致。

代码:

def _findExecutable(majorVersion):
    """
    Restricted function to determine the names of the executable.
    
    @param majorVersion major python version of the executables (int)
    @return names of the executable (list)
    """
    # Determine Python Version
    if majorVersion == 3:
        minorVersions = range(5)
    elif majorVersion == 2:
        minorVersions = range(5, 9)
    else:
        return []

改为:

def _findExecutable(majorVersion):
    """
    Restricted function to determine the names of the executable.
    
    @param majorVersion major python version of the executables (int)
    @return names of the executable (list)
    """
    # Determine Python Version
    if majorVersion == 3:
        minorVersions = range(7)
    elif majorVersion == 2:
        minorVersions = range(5, 9)
    else:
        return []
然后重新压缩为zip,重新安装插件,激活,搞定。

    

PS:不好意思,一直都很忙,这篇和上篇写的比较粗糙,可能很多人还是看不懂。我已经将问题反馈给eric6开源组织,也许会被看到。

有人遇到和我一样的问题,可以加我QQ 57049067。也许我不能马上联系,但总会看到。