还是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。也许我不能马上联系,但总会看到。
在使用Python3.6和pyqt5.8的eric6环境中,尝试安装cx-freeze插件时遇到错误提示找不到cxfreeze.bat。通过修改插件源代码中关于Python版本判断的部分,将3.6版本的minorVersions范围扩大到7,解决了此问题。重新打包并安装插件后,成功激活。已将问题反馈给eric6开源社区,有相同困扰的读者可以联系作者。

4242

被折叠的 条评论
为什么被折叠?



