pyinstaller -F 打包异常
2014 INFO: PyInstaller: 4.5.1
2014 INFO: Python: 3.8.8 (conda)
2015 INFO: Platform: Windows-10-10.0.17763-SP0
2016 INFO: wrote E:\Code\invitation-master\card.spec
2018 INFO: UPX is not available.
2022 INFO: Extending PYTHONPATH with paths
['E:\\Code\\invitation-master', 'E:\\Code\\invitation-master']
2699 INFO: checking Analysis
2699 INFO: Building Analysis because Analysis-00.toc is non existent
2699 INFO: Initializing module dependency graph...
2704 INFO: Caching module graph hooks...
2723 INFO: Analyzing base_library.zip ...
9318 INFO: Processing pre-find module path hook distutils from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
9319 INFO: distutils: retargeting to non-venv dir 'c:\\programdata\\anaconda3\\lib'
14373 INFO: Caching module dependency graph...
14685 INFO: running Analysis Analysis-00.toc
14709 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\programdata\anaconda3\python.exe
15049 INFO: Analyzing E:\Code\invitation-master\card.py
17545 INFO: Processing pre-find module path hook site from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
17546 INFO: site: retargeting to fake-dir 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\fake-modules'
42802 INFO: Processing pre-safe import module hook urllib3.packages.six.moves from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-urllib3.packages.six.moves.py'.
53039 INFO: Processing pre-safe import module hook six.moves from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
68757 INFO: Processing pre-safe import module hook win32com from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
79299 INFO: Processing module hooks...
79299 INFO: Loading module hook 'hook-appdirs.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
79308 INFO: Loading module hook 'hook-bcrypt.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
79309 INFO: Loading module hook 'hook-certifi.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
79315 INFO: Loading module hook 'hook-cryptography.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
79651 INFO: Loading module hook 'hook-docutils.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
82756 INFO: Loading module hook 'hook-IPython.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
83646 INFO: Loading module hook 'hook-jedi.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85488 INFO: Loading module hook 'hook-jinja2.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85511 INFO: Loading module hook 'hook-jsonschema.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85540 INFO: Loading module hook 'hook-nacl.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85566 INFO: Loading module hook 'hook-nbconvert.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85723 INFO: Loading module hook 'hook-nbformat.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
85792 INFO: Loading module hook 'hook-notebook.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
90426 INFO: Loading module hook 'hook-parso.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
90446 INFO: Loading module hook 'hook-pycparser.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
90449 INFO: Loading module hook 'hook-pytest.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
92253 INFO: Loading module hook 'hook-pythoncom.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
93045 INFO: Loading module hook 'hook-pywintypes.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
93824 INFO: Loading module hook 'hook-regex.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
93825 INFO: Loading module hook 'hook-win32com.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
c:\programdata\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):
94853 INFO: Loading module hook 'hook-zmq.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
97586 INFO: Loading module hook 'hook-babel.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
97793 INFO: Loading module hook 'hook-difflib.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
97802 INFO: Loading module hook 'hook-distutils.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
97803 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
97812 INFO: Loading module hook 'hook-encodings.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
97927 INFO: Loading module hook 'hook-gevent.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
98615 INFO: Determining a mapping of distributions to packages...
200658 WARNING: Unable to find package for requirement zope.interface from package gevent.
200658 WARNING: Unable to find package for requirement zope.event from package gevent.
200659 INFO: Packages required by gevent:
['greenlet', 'setuptools', 'cffi']
202578 INFO: Loading module hook 'hook-heapq.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
202588 INFO: Loading module hook 'hook-importlib_metadata.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
202591 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
202641 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
203420 INFO: Matplotlib backend "GTK3Agg": ignored
backend Gtk3Agg requires cairo
203810 INFO: Matplotlib backend "GTK3Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
204203 INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx' from 'matplotlib.backends' (c:\programdata\anaconda3\lib\site-packages\matplotlib\backends\__init__.py)
205393 INFO: Matplotlib backend "nbAgg": added
<string>:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
205974 INFO: Matplotlib backend "Qt4Agg": added
206356 INFO: Matplotlib backend "Qt4Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
206924 INFO: Matplotlib backend "Qt5Agg": added
207315 INFO: Matplotlib backend "Qt5Cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
208034 INFO: Matplotlib backend "TkAgg": added
208701 INFO: Matplotlib backend "TkCairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
209379 INFO: Matplotlib backend "WebAgg": added
210024 INFO: Matplotlib backend "WX": ignored
No module named 'wx'
210409 INFO: Matplotlib backend "WXAgg": ignored
No module named 'wx'
210787 INFO: Matplotlib backend "WXCairo": ignored
No module named 'wx'
211258 INFO: Matplotlib backend "agg": added
211651 INFO: Matplotlib backend "cairo": ignored
cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
212303 INFO: Matplotlib backend "pdf": added
212957 INFO: Matplotlib backend "pgf": added
213440 INFO: Matplotlib backend "ps": added
213939 INFO: Matplotlib backend "svg": added
214577 INFO: Matplotlib backend "template": added
215288 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215684 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215693 INFO: Loading module hook 'hook-numpy.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215851 INFO: Import to be excluded not found: 'f2py'
215851 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215863 INFO: Loading module hook 'hook-packaging.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215864 INFO: Loading module hook 'hook-pickle.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
215875 INFO: Loading module hook 'hook-PIL.Image.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
216637 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
216647 INFO: Loading module hook 'hook-PIL.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
216685 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
216695 INFO: Loading module hook 'hook-pkg_resources.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
217923 WARNING: Hidden import "pkg_resources.py2_warn" not found!
217924 WARNING: Hidden import "pkg_resources.markers" not found!
217935 INFO: Loading module hook 'hook-pygments.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
220682 INFO: Loading module hook 'hook-PyQt5.py' from 'c:\\programdata\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
Traceback (most recent call last):
File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 126, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 815, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 762, in build
exec(code, spec_namespace)
File "E:\Code\invitation-master\card.spec", line 7, in <module>
a = Analysis(['card.py'],
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 294, in __init__
self.__postinit__()
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 159, in __postinit__
self.assemble()
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 473, in assemble
self.graph.process_post_graph_hooks(self)
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\depend\analysis.py", line 373, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\depend\imphook.py", line 451, in post_graph
self._load_hook_module()
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\depend\imphook.py", line 408, in _load_hook_module
self._hook_module = importlib_load_source(
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\compat.py", line 632, in importlib_load_source
return mod_loader.load_module()
File "" , line 462, in _check_name_wrapper
File "" , line 962, in load_module
File "" , line 787, in load_module
File "" , line 265, in _load_module_shim
File "" , line 702, in _load
File "" , line 671, in _load_unlocked
File "" , line 783, in exec_module
File "" , line 219, in _call_with_frames_removed
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\hooks\hook-PyQt5.py", line 11, in <module>
from PyInstaller.utils.hooks.qt import pyqt5_library_info, \
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 162, in <module>
pyqt5_library_info = QtLibraryInfo('PyQt5')
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 54, in __init__
if hooks.is_module_satisfies("PyQt5 >= 5.15.4"):
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 502, in is_module_satisfies
version = get_module_attribute(module_name, version_attr)
File "c:\programdata\anaconda3\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 352, in get_module_attribute
raise AttributeError(
AttributeError: Module 'PyQt5' has no attribute '__version__'
未知
pip安装PyQt5时 加入参数 --user
pip install PyQt5 --user