在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>
我的系统是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>



