iT邦幫忙

0

Python pyinstaller matplotlib 包裝執行檔無法執行

我使用pyinstaller套件包裝執行檔後,無法順利開啟繪圖的部分
想請問一下應該使用什麼版本才可以順利出現圖或是可以從安裝過程看出哪裡有問題?
以下為安裝過程:
(base) PS C:\Users\User\Desktop\exe> pyinstaller -F 應用Python打造統計分析工具.py -c
1309 INFO: PyInstaller: 4.4
1309 INFO: Python: 3.8.8 (conda)
1309 INFO: Platform: Windows-10-10.0.19041-SP0
1310 INFO: wrote C:\Users\User\Desktop\exe\應用Python打造統計分析工具.spec
1313 INFO: UPX is not available.
1314 INFO: Extending PYTHONPATH with paths
['C:\Users\User\Desktop\exe', 'C:\Users\User\Desktop\exe']
1345 INFO: checking Analysis
1346 INFO: Building Analysis because Analysis-00.toc is non existent
1346 INFO: Initializing module dependency graph...
1353 INFO: Caching module graph hooks...
1365 INFO: Analyzing base_library.zip ...
5683 INFO: Processing pre-find module path hook distutils from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
5685 INFO: distutils: retargeting to non-venv dir 'c:\users\user\anaconda3\lib'
9274 INFO: Caching module dependency graph...
9464 INFO: running Analysis Analysis-00.toc
9480 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\user\anaconda3\python.exe
9696 INFO: Analyzing C:\Users\User\Desktop\exe\應用Python打造統計分析工具.py
12728 INFO: Processing pre-find module path hook site from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-site.py'.
12729 INFO: site: retargeting to fake-dir 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\fake-modules'
27163 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-urllib3.packages.six.moves.py'.
36139 INFO: Processing pre-safe import module hook six.moves from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_safe_import_module\hook-six.moves.py'.
48890 INFO: Processing pre-safe import module hook win32com from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\pre_safe_import_module\hook-win32com.py'.
125859 INFO: Processing module hooks...
125859 INFO: Loading module hook 'hook-appdirs.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
125871 INFO: Loading module hook 'hook-argon2.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
125872 INFO: Loading module hook 'hook-bcrypt.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
125873 INFO: Loading module hook 'hook-bokeh.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
127924 INFO: Loading module hook 'hook-certifi.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
127928 INFO: Loading module hook 'hook-cryptography.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
128238 INFO: Loading module hook 'hook-dask.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
128289 INFO: Loading module hook 'hook-docutils.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
130708 INFO: Loading module hook 'hook-h5py.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
130711 INFO: Loading module hook 'hook-IPython.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
131654 INFO: Loading module hook 'hook-jedi.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
132997 INFO: Loading module hook 'hook-jinja2.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133014 INFO: Loading module hook 'hook-jsonschema.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133034 INFO: Loading module hook 'hook-llvmlite.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133040 INFO: Loading module hook 'hook-lxml.etree.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133042 INFO: Loading module hook 'hook-lxml.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133456 INFO: Loading module hook 'hook-nacl.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133477 INFO: Loading module hook 'hook-nbconvert.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133589 INFO: Loading module hook 'hook-nbformat.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
133643 INFO: Loading module hook 'hook-notebook.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
136167 INFO: Loading module hook 'hook-numba.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
136231 INFO: Loading module hook 'hook-openpyxl.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
136367 INFO: Loading module hook 'hook-patsy.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
136368 INFO: Loading module hook 'hook-pycparser.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
136369 INFO: Loading module hook 'hook-pytest.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
137839 INFO: Loading module hook 'hook-pythoncom.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
138448 INFO: Loading module hook 'hook-pywintypes.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
139043 INFO: Loading module hook 'hook-regex.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
139044 INFO: Loading module hook 'hook-statsmodels.tsa.statespace.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
140311 INFO: Loading module hook 'hook-tables.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
140313 INFO: Loading module hook 'hook-win32com.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
c:\users\user\anaconda3\lib\site-packages\win32com\client\makepy.py:369: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if path is not '' and not os.path.exists(path):
141243 INFO: Loading module hook 'hook-zmq.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
143698 INFO: Loading module hook 'hook-babel.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
143894 INFO: Loading module hook 'hook-difflib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
143906 INFO: Loading module hook 'hook-distutils.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
143907 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
143919 INFO: Loading module hook 'hook-encodings.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
144000 INFO: Loading module hook 'hook-gevent.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
144549 INFO: Determining a mapping of distributions to packages...
233814 WARNING: Unable to find package for requirement zope.event from package gevent.
233815 WARNING: Unable to find package for requirement zope.interface from package gevent.
233823 INFO: Packages required by gevent:
['cffi', 'setuptools', 'greenlet']
235234 INFO: Loading module hook 'hook-heapq.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
235245 INFO: Loading module hook 'hook-importlib_metadata.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
235247 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
235284 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
236208 INFO: Matplotlib backend "GTK3Agg": ignored
The GTK3 backends require PyGObject
236639 INFO: Matplotlib backend "GTK3Cairo": ignored
The GTK3 backends require PyGObject
236937 INFO: Matplotlib backend "MacOSX": ignored
cannot import name 'macosx' from 'matplotlib.backends' (c:\users\user\anaconda3\lib\site-packages\matplotlib\backends_init.py)
237681 INFO: Matplotlib backend "nbAgg": added
:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
238088 INFO: Matplotlib backend "Qt4Agg": added
:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4cairo backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
238489 INFO: Matplotlib backend "Qt4Cairo": added
238895 INFO: Matplotlib backend "Qt5Agg": added
239304 INFO: Matplotlib backend "Qt5Cairo": added
239795 INFO: Matplotlib backend "TkAgg": added
240265 INFO: Matplotlib backend "TkCairo": added
240782 INFO: Matplotlib backend "WebAgg": added
241275 INFO: Matplotlib backend "WX": added
241760 INFO: Matplotlib backend "WXAgg": added
242243 INFO: Matplotlib backend "WXCairo": added
242588 INFO: Matplotlib backend "agg": added
242946 INFO: Matplotlib backend "cairo": added
243403 INFO: Matplotlib backend "pdf": added
243848 INFO: Matplotlib backend "pgf": added
244200 INFO: Matplotlib backend "ps": added
244551 INFO: Matplotlib backend "svg": added
244984 INFO: Matplotlib backend "template": added
245806 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246119 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246132 INFO: Loading module hook 'hook-numpy.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246219 INFO: Import to be excluded not found: 'f2py'
246260 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246272 INFO: Loading module hook 'hook-packaging.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246273 INFO: Loading module hook 'hook-pandas.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246753 INFO: Loading module hook 'hook-pickle.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
246765 INFO: Loading module hook 'hook-PIL.Image.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
247226 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
247238 INFO: Loading module hook 'hook-PIL.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
247275 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
247287 INFO: Loading module hook 'hook-pkg_resources.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
248357 WARNING: Hidden import "pkg_resources.py2_warn" not found!
248358 WARNING: Hidden import "pkg_resources.markers" not found!
248371 INFO: Loading module hook 'hook-pygments.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
250322 INFO: Loading module hook 'hook-PyQt5.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
250619 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
250702 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
250936 INFO: Loading module hook 'hook-PyQt5.QtSvg.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
251493 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
251940 INFO: Loading module hook 'hook-pytz.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252142 INFO: Loading module hook 'hook-scipy.linalg.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252143 INFO: Loading module hook 'hook-scipy.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252145 INFO: Loading module hook 'hook-scipy.sparse.csgraph.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252154 INFO: Loading module hook 'hook-scipy.spatial.transform.rotation.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252298 INFO: Loading module hook 'hook-scipy.special._ellip_harm_2.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252300 INFO: Loading module hook 'hook-scipy.special._ufuncs.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252301 INFO: Loading module hook 'hook-scipy.stats._stats.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
252308 INFO: Loading module hook 'hook-setuptools.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
253511 INFO: Loading module hook 'hook-sphinx.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
259553 INFO: Loading module hook 'hook-sqlalchemy.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
259925 WARNING: Hidden import "MySQLdb" not found!
259926 WARNING: Hidden import "psycopg2" not found!
262971 INFO: Loading module hook 'hook-sqlite3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263058 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263059 INFO: Loading module hook 'hook-wcwidth.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263064 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263340 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263341 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263342 INFO: Loading module hook 'hook-xml.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263349 INFO: Loading module hook 'hook-zope.interface.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263362 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263518 INFO: checking Tree
263518 INFO: Building Tree because Tree-00.toc is non existent
263519 INFO: Building Tree Tree-00.toc
263579 INFO: checking Tree
263579 INFO: Building Tree because Tree-01.toc is non existent
263580 INFO: Building Tree Tree-01.toc
263675 INFO: checking Tree
263676 INFO: Building Tree because Tree-02.toc is non existent
263677 INFO: Building Tree Tree-02.toc
263684 INFO: Loading module hook 'hook-lxml.isoschematron.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
263693 INFO: Loading module hook 'hook-lxml.objectify.py' from 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
263694 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
263972 INFO: checking Tree
263972 INFO: Building Tree because Tree-03.toc is non existent
263973 INFO: Building Tree Tree-03.toc
263975 INFO: Looking for ctypes DLLs
264216 INFO: Analyzing run-time hooks ...
264249 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py'
264253 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
264256 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
264261 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_inspect.py'
264263 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\rthooks\pyi_rth_traitlets.py'
264265 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgres.py'
264270 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32comgenpy.py'
264273 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\_pyinstaller_hooks_contrib\hooks\rthooks\pyi_rth_certifi.py'
264275 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pyqt5.py'
264277 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_mplconfig.py'
264282 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth__tkinter.py'
264362 INFO: Looking for dynamic libraries
267021 INFO: Looking for eggs
267021 INFO: Using Python library c:\users\user\anaconda3\python38.dll
267023 INFO: Found binding redirects:
[]
267080 INFO: Warnings written to C:\Users\User\Desktop\exe\build\應用Python打造統計分析工具\warn-應用Python打造統計分析工具.txt
267788 INFO: Graph cross-reference written to C:\Users\User\Desktop\exe\build\應用Python打造統計分析工具\xref-應用Python打造統計分析工具.html
268133 INFO: checking PYZ
268133 INFO: Building PYZ because PYZ-00.toc is non existent
268135 INFO: Building PYZ (ZlibArchive) C:\Users\User\Desktop\exe\build\應用Python打造統計分析工具\PYZ-00.pyz
276443 INFO: Building PYZ (ZlibArchive) C:\Users\User\Desktop\exe\build\應用Python打造統計分析工具\PYZ-00.pyz completed successfully.
276565 INFO: checking PKG
276566 INFO: Building PKG because PKG-00.toc is non existent
276567 INFO: Building PKG (CArchive) PKG-00.pkg
397874 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
398079 INFO: Bootloader c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
398080 INFO: checking EXE
398082 INFO: Building EXE because EXE-00.toc is non existent
398090 INFO: Building EXE from EXE-00.toc
398093 INFO: Copying icons from ['c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
398095 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
398095 INFO: Writing RT_ICON 1 resource with 3752 bytes
398095 INFO: Writing RT_ICON 2 resource with 2216 bytes
398096 INFO: Writing RT_ICON 3 resource with 1384 bytes
398096 INFO: Writing RT_ICON 4 resource with 37019 bytes
398097 INFO: Writing RT_ICON 5 resource with 9640 bytes
398098 INFO: Writing RT_ICON 6 resource with 4264 bytes
398098 INFO: Writing RT_ICON 7 resource with 1128 bytes
398110 INFO: Updating manifest in C:\Users\User\Desktop\exe\build\應用Python打造統計分析工具\run.exe.5_oi2x9i
398119 INFO: Updating resource type 24 name 1 language 0
398123 INFO: Appending archive to EXE C:\Users\User\Desktop\exe\dist\應用Python打造統計分析工具.exe
493698 INFO: Building EXE from EXE-00.toc completed successfully.
謝謝大家幫我解惑


尚未有邦友留言

立即登入留言