报错 报错 报错 报错
➜ dist pyinstaller -v 4.5.1 ➜ dist whereis pyinstaller pyinstaller: /home/maya/.local/bin/pyinstaller ➜ dist whereis python python: /usr/bin/python3.8 /usr/bin/python2.7-config /usr/bin/python3.8-config /usr/bin/python /usr/bin/python3.9-config /usr/bin/python2.7 /usr/bin/python3.9 /usr/lib/python3.8 /usr/lib/python2.7 /usr/lib/python3.9 /etc/python3.8 /etc/python2.7 /etc/python3.9 /usr/local/bin/python3.9-config /usr/local/bin/python3.9 /usr/local/lib/python3.8 /usr/local/lib/python2.7 /usr/local/lib/python3.9 /usr/include/python3.8 /usr/include/python2.7 /usr/include/python3.9 /usr/local/python3.9 /usr/share/python
➜ VIP_MOVIE pyinstaller -F -w -i f1.ico hello.py -p /usr/local/lib/python3.9/site-packages 94 INFO: PyInstaller: 4.5.1 94 INFO: Python: 3.9.5 98 INFO: Platform: Linux-5.11.0-36-generic-x86_64-with-glibc2.31 100 INFO: wrote /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/hello.spec 110 INFO: UPX is not available. 113 INFO: Extending PYTHonPATH with paths ['/home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE', '/usr/local/lib/python3.9/site-packages', '/home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE'] 526 INFO: checking Analysis 537 INFO: Building because pathex changed 537 INFO: Initializing module dependency graph... 540 INFO: Caching module graph hooks... 552 INFO: Analyzing base_library.zip ... 6438 INFO: Processing pre-find module path hook distutils from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'. 6439 INFO: distutils: retargeting to non-venv dir '/usr/lib/python3.9' 12055 INFO: Caching module dependency graph... 12435 INFO: running Analysis Analysis-00.toc 12510 INFO: Analyzing /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/hello.py 12513 INFO: Processing module hooks... 12514 INFO: Loading module hook 'hook-_tkinter.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12670 INFO: checking Tree 12682 INFO: checking Tree 12773 WARNING: Tcl modules directory /usr/share/tcltk/tcl8.6/../tcl8 does not exist. 12775 INFO: Loading module hook 'hook-heapq.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12779 INFO: Loading module hook 'hook-sysconfig.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12796 INFO: Loading module hook 'hook-multiprocessing.util.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12799 INFO: Loading module hook 'hook-pickle.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12801 INFO: Loading module hook 'hook-distutils.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12802 INFO: Loading module hook 'hook-distutils.util.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12804 INFO: Loading module hook 'hook-lib2to3.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12828 INFO: Loading module hook 'hook-encodings.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12936 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12937 INFO: Loading module hook 'hook-difflib.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 12940 INFO: Loading module hook 'hook-xml.py' from '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks'... 13094 INFO: Looking for ctypes DLLs 13171 INFO: Analyzing run-time hooks ... 13179 INFO: Including run-time hook '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py' 13183 INFO: Including run-time hook '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py' 13189 INFO: Including run-time hook '/home/maya/.local/lib/python3.9/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py' 13203 INFO: Looking for dynamic libraries 13743 INFO: Looking for eggs 13743 INFO: Python library not in binary dependencies. Doing additional searching... 13833 INFO: Using Python library /usr/local/lib/libpython3.9.so.1.0 13844 INFO: Warnings written to /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/build/hello/warn-hello.txt 13904 INFO: Graph cross-reference written to /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/build/hello/xref-hello.html 13916 INFO: checking PYZ 13920 INFO: Building because toc changed 13921 INFO: Building PYZ (ZlibArchive) /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/build/hello/PYZ-00.pyz 14728 INFO: Building PYZ (ZlibArchive) /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/build/hello/PYZ-00.pyz completed successfully. 14736 INFO: checking PKG 14737 INFO: Building because toc changed 14737 INFO: Building PKG (CArchive) PKG-00.pkg 26700 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully. 26706 INFO: Bootloader /home/maya/.local/lib/python3.9/site-packages/PyInstaller/bootloader/Linux-64bit-intel/run 26706 INFO: checking EXE 26708 INFO: Rebuilding EXE-00.toc because hello missing 26708 INFO: Building EXE from EXE-00.toc 26709 INFO: Appending archive to ELF section in EXE /home/maya/documents/pythonProject/1xiangmo/VIP_MOVIE/dist/hello 26806 INFO: Building EXE from EXE-00.toc completed successfully. ➜ VIP_MOVIE ls '字符串转 md5 工具.py' f1.ico f4.ico hello.spec vip_movie.spec build f2.ico fa.ico __pycache__ dist f3.ico hello.py vip_movie.py ➜ VIP_MOVIE cd dist ➜ dist ls hello vip_movie
报错,原因是什么?怎么解决,求助!!!
➜ dist ./hello
[104655] Module object for struct is NULL!
Traceback (most recent call last):
File "struct.py", line 13, in
ModuleNotFoundError: No module named '_struct'
[104655] Module object for pyimod02_archive is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod02_archive.py", line 30, in
ModuleNotFoundError: No module named 'struct'
[104655] Module object for pyimod03_importers is NULL!
Traceback (most recent call last):
File "PyInstaller/loader/pyimod03_importers.py", line 26, in
ModuleNotFoundError: No module named 'pyimod02_archive'
Traceback (most recent call last):
File "PyInstaller/loader/pyiboot01_bootstrap.py", line 17, in
ModuleNotFoundError: No module named 'pyimod03_importers'
[104655] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!
➜ dist ./vip_movie [105048] Module object for struct is NULL! Traceback (most recent call last): File "struct.py", line 13, inModuleNotFoundError: No module named '_struct' [105048] Module object for pyimod02_archive is NULL! Traceback (most recent call last): File "PyInstaller/loader/pyimod02_archive.py", line 30, in ModuleNotFoundError: No module named 'struct' [105048] Module object for pyimod03_importers is NULL! Traceback (most recent call last): File "PyInstaller/loader/pyimod03_importers.py", line 26, in ModuleNotFoundError: No module named 'pyimod02_archive' Traceback (most recent call last): File "PyInstaller/loader/pyiboot01_bootstrap.py", line 17, in ModuleNotFoundError: No module named 'pyimod03_importers' [105048] Failed to execute script 'pyiboot01_bootstrap' due to unhandled exception!



