注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

小盒子的小盒

知道的越多不知道的就越多

 
 
 

日志

 
 

【原创】使用 PyInstaller 将PyQt生成可执行文件exe  

2017-08-01 13:22:03|  分类: Python |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
如果在生成的过程中出现以下错误:
13306 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13306 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13322 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13322 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13338 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13338 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13338 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13338 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13353 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13353 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13353 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13353 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13369 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13369 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13369 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13369 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13384 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13384 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13384 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13384 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13400 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13400 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
13400 ERROR: Could not find qmake version 5.x, make sure PATH is set correctly or try setting QT5DIR.
13400 ERROR: Cannot find QT_INSTALL_QML directory, "qmake -query QT_INSTALL_QML" returned nothing
表示没有将qmake添加到环境变量中,将qmake所在的目录添加到系统环境变量中
;D:\Qt\5.9.1\msvc2015\bin
然后在执行 

# pyinstaller --onefile smallbox.py  //生成一个exe单一文件
# pyinstaller -F -w --onefile smallbox.py //执行exe文件时,不出现控制台

建议刚开始生成的时候要控制台的输出,这样可以看到qml相关的文件是否加载成功,方便调试。

作者:小盒子
时间:2017-08-01 13:20PM
地点:大连


注:本文属小盒子原创,转载请与博主联系。谢谢合作

  评论这张
 
阅读(37)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017