网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
11月23日漏签0天
python吧 关注:479,580贴子:1,980,710
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 17回复贴,共1页
<<返回python吧
>0< 加载中...

求助,使用pyinstaller打包的应用无法运行

  • 只看楼主
  • 收藏

  • 回复
  • 超级额图
  • 秀才
    3
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
在pycharm里面可以运行,但是打包完就运行不了,请大神帮忙解决,感谢
我的系统是win10,python 3.6.6
D:\01.python\RoutingAggregationTool>pip list
Package Version
----------- ---------
altgraph 0.16.1
future 0.16.0
IPy 0.83
macholib 1.10
pefile 2017.11.5
pip 18.0
PyInstaller 3.3.1
pypiwin32 223
PyQt5 5.11.2
PyQt5-sip 4.19.12
pyqt5-tools 5.9.0.1.2
pywin32 223
QScintilla 2.10.7
setuptools 39.0.1
sip 4.19.8
xlrd 1.1.0
D:\01.python\RoutingAggregationTool>D:\01.python\RoutingAggregationTool\dist\RoutingAggregationTool\RoutingAggregationTool.exe
Traceback (most recent call last):
File "RoutingAggregationTool.py", line 4, in <module>
from mainView import Ui_MainWindow
File "d:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "mainView.py", line 9, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
File "d:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
ModuleNotFoundError: No module named 'PyQt5.sip'
[8876] Failed to execute script RoutingAggregationTool
D:\01.python\RoutingAggregationTool>
打包过程未发现异常
D:\01.python\RoutingAggregationTool>pyinstaller RoutingAggregationTool.py -p mainView.py
80 INFO: PyInstaller: 3.3.1
80 INFO: Python: 3.6.6
82 INFO: Platform: Windows-10-10.0.16299-SP0
93 INFO: wrote D:\01.python\RoutingAggregationTool\RoutingAggregationTool.spec
105 INFO: UPX is not available.
113 INFO: Extending PYTHONPATH with paths
['D:\\01.python\\RoutingAggregationTool',
'D:\\01.python\\RoutingAggregationTool\\mainView.py',
'D:\\01.python\\RoutingAggregationTool']
114 INFO: checking Analysis
127 INFO: Building Analysis because out00-Analysis.toc is non existent
142 INFO: Initializing module dependency graph...
149 INFO: Initializing module graph hooks...
155 INFO: Analyzing base_library.zip ...
3232 INFO: running Analysis out00-Analysis.toc
3235 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by d:\python36\python.exe
4049 INFO: Caching module hooks...
4055 INFO: Analyzing D:\01.python\RoutingAggregationTool\RoutingAggregationTool.py
4541 INFO: Loading module hooks...
4541 INFO: Loading module hook "hook-encodings.py"...
4669 INFO: Loading module hook "hook-pydoc.py"...
4669 INFO: Loading module hook "hook-PyQt5.py"...
4678 INFO: Loading module hook "hook-PyQt5.Qt.py"...
4683 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
4801 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
5383 INFO: Loading module hook "hook-PyQt5.QtPrintSupport.py"...
5483 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
5484 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
5488 INFO: Loading module hook "hook-xml.py"...
5733 INFO: Looking for ctypes DLLs
5733 INFO: Analyzing run-time hooks ...
5740 INFO: Including run-time hook 'pyi_rth_qt5.py'
5762 INFO: Looking for dynamic libraries
6725 INFO: Looking for eggs
6725 INFO: Using Python library d:\python36\python36.dll
6728 INFO: Found binding redirects:
[]
6746 INFO: Warnings written to D:\01.python\RoutingAggregationTool\build\RoutingAggregationTool\warnRoutingAggregationTool.txt
6809 INFO: Graph cross-reference written to D:\01.python\RoutingAggregationTool\build\RoutingAggregationTool\xref-RoutingAggregationTool.html
6843 INFO: checking PYZ
6845 INFO: Building PYZ because out00-PYZ.toc is non existent
6857 INFO: Building PYZ (ZlibArchive) D:\01.python\RoutingAggregationTool\build\RoutingAggregationTool\out00-PYZ.pyz
7446 INFO: Building PYZ (ZlibArchive) D:\01.python\RoutingAggregationTool\build\RoutingAggregationTool\out00-PYZ.pyz completed successfully.
7457 INFO: checking PKG
7458 INFO: Building PKG because out00-PKG.toc is non existent
7461 INFO: Building PKG (CArchive) out00-PKG.pkg
7490 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
7495 INFO: Bootloader d:\python36\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
7497 INFO: checking EXE
7508 INFO: Building EXE because out00-EXE.toc is non existent
7512 INFO: Building EXE from out00-EXE.toc
7514 INFO: Appending archive to EXE D:\01.python\RoutingAggregationTool\build\RoutingAggregationTool\RoutingAggregationTool.exe
7531 INFO: Building EXE from out00-EXE.toc completed successfully.
7537 INFO: checking COLLECT
7541 INFO: Building COLLECT because out00-COLLECT.toc is non existent
7549 INFO: Building COLLECT out00-COLLECT.toc
8154 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
D:\01.python\RoutingAggregationTool>


  • Loiter223
  • 白丁
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
是3.7版本的吧


2025-11-23 08:38:15
广告
不感兴趣
开通SVIP免广告
  • 刘鑫_xinca
  • 白丁
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
File "mainView.py", line 9, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
File "d:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
ModuleNotFoundError: No module named 'PyQt5.sip'
[8876] Failed to execute script RoutingAggregationTool
根据以上错误提示,在你的程序脚本里面加上sip的导入
import PyQt5.sip
在编译打包试试


  • 吴创尉
  • 贡士
    6
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
你是在cmd窗口下打包的吗?


  • hh123456789119
  • 白丁
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼


能帮我看看这是什么问题吗?pyinstaller 打包exe后运行的错误


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 17回复贴,共1页
<<返回python吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示