PyInstaller 不能 运行 一个简单的可执行文件(pytube 模块)

PyInstaller can't run a simple executable (pytube module)

好吧,两行代码:

from pytube import YouTube
print("Hello World")

我试图用这个命令制作一个可执行文件:pyinstaller --onefile --hidden-import pytube --debug=all 123456.py

但是当我 运行 exe 时,我有这个错误:

$ ./123456.exe
[13364] PyInstaller Bootloader 3.x
[13364] LOADER: executable is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist3456.exe
[13364] LOADER: homepath is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist
[13364] LOADER: _MEIPASS2 is NULL
[13364] LOADER: archivename is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist3456.exe
[13364] LOADER: Cookie found at offset 0x6BE643
[13364] LOADER: Extracting binaries
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642 with security string
: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\lib-dynload with sec
urity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\asyncio with securit
y string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\concurrent with secu
rity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\concurrent\futures w
ith security string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\ctypes with security
 string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\distutils with secur
ity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\email with security
string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\html with security s
tring: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\http with security s
tring: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\importlib with secur
ity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\json with security s
tring: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\logging with securit
y string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\multiprocessing with
 security string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\multiprocessing\dumm
y with security string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001
)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\pydoc_data with secu
rity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\unittest with securi
ty string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\urllib with security
 string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\xml with security st
ring: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\xml\etree with secur
ity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\xml\parsers with sec
urity string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\xml\sax with securit
y string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: creating directory C:\msys64\tmp\_MEI133642\xmlrpc with security
 string: D:(A;;FA;;;S-1-5-21-2491018127-1704774179-573031757-1001)
[13364] LOADER: Executing self as child
[13364] LOADER: set _MEIPASS2 to C:\msys64\tmp\_MEI133642
[13364] LOADER: Setting up to run child
[13364] LOADER: Creating child process
[13364] LOADER: Waiting for child process to finish...
[9392] PyInstaller Bootloader 3.x
[9392] LOADER: executable is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist3456.exe
[9392] LOADER: homepath is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist
[9392] LOADER: _MEIPASS2 is C:\msys64\tmp\_MEI133642
[9392] LOADER: archivename is C:\Users\╫±▐≤ΪΎ≥\Desktop\dist3456.exe
[9392] LOADER: Cookie found at offset 0x6BE643
[9392] LOADER: SetDllDirectory(C:\msys64\tmp\_MEI133642)
[9392] LOADER: Already in the child - running user's code.
[9392] LOADER: manifestpath: C:\msys64\tmp\_MEI1336423456.exe.manifest
[9392] LOADER: Error activating the context: ActivateActCtx:
╠ώά Ώ±Ύ≤Ώ▄ϋίώά Ύ±ώ≤ΉΎ² Ώί±ώέ▄ΈΈΎΊΪΎ≥ Ώ±ΎίΏώΈίήΉ▌Ίύ≥ ίΊί±ήΎΏΎ▀ύ≤ύ≥ ϊώί±ήά≤▀ά≥ άΏ▌
ΪΫ≈ί, ίΏίώϊ▐ ΪΎ Ώί±ώέ▄ΈΈΎΊ Ώ±ΎίΏώΈίήΉ▌Ίύ≥ ίΊί±ήΎΏΎ▀ύ≤ύ≥ ϊώί±ήά≤▀ά≥ ί▀≈ί ▐ϊύ Ύ±ώ≤
Ϊί▀.

[9392] LOADER: Python library: C:\msys64\tmp\_MEI133642\libpython3.8.dll
[9392] LOADER: Loaded functions from Python library.
[9392] LOADER: Manipulating environment (sys.path, sys.prefix)
[9392] LOADER: sys.prefix is C:\msys64\tmp\_MEI133642
[9392] LOADER: Pre-init sys.path is C:\msys64\tmp\_MEI133642\base_library.zip;C:
\msys64\tmp\_MEI133642\lib-dynload;C:\msys64\tmp\_MEI133642
[9392] LOADER: Setting runtime options
[9392] LOADER: Bootloader option: pyi-windows-manifest-filename 123456.exe.manif
est
[9392] LOADER: Runtime option: v
[9392] LOADER: Initializing python
import _frozen_importlib # frozen
import _imp # builtin
import '_thread' # 
import '_warnings' # 
import '_weakref' # 
import '_frozen_importlib_external' # 
import '_io' # 
import 'marshal' # 
import 'nt' # 
import _thread # previously loaded ('_thread')
import '_thread' # 
import _weakref # previously loaded ('_weakref')
import '_weakref' # 
import 'winreg' # 
# installing zipimport hook
import 'time' # 
import 'zipimport' # 
# installed zipimport hook
# zipimport: found 148 names in 'C:/msys64/tmp/_MEI133642/base_library.zip'
import '_codecs' # 
import codecs # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/codecs
.pyc
import encodings.aliases # loaded from Zip C:/msys64/tmp/_MEI133642/base_library
.zip/encodings/aliases.pyc
import encodings # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/enc
odings/__init__.pyc
import encodings.utf_8 # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.z
ip/encodings/utf_8.pyc
import encodings.cp1253 # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.
zip/encodings/cp1253.pyc
import '_signal' # 
import encodings.latin_1 # loaded from Zip C:/msys64/tmp/_MEI133642/base_library
.zip/encodings/latin_1.pyc
import '_abc' # 
import abc # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/abc.pyc
import io # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/io.pyc
[9392] LOADER: Overriding Python's sys.path
[9392] LOADER: Post-init sys.path is C:\msys64\tmp\_MEI133642\base_library.zip;C
:\msys64\tmp\_MEI133642\lib-dynload;C:\msys64\tmp\_MEI133642
[9392] LOADER: Setting sys.argv
[9392] LOADER: setting sys._MEIPASS
[9392] LOADER: importing modules from CArchive
[9392] LOADER: extracted struct
[9392] LOADER: callfunction returned...
# extension module '_struct' loaded from 'C:\msys64\tmp\_MEI133642\lib-dynlo
ad/_struct-cpython-38.dll'
# extension module '_struct' executed from 'C:\msys64\tmp\_MEI133642\lib-dyn
load/_struct-cpython-38.dll'
import '_struct' # 
[9392] LOADER: extracted pyimod01_os_path
[9392] LOADER: callfunction returned...
[9392] LOADER: extracted pyimod02_archive
[9392] LOADER: callfunction returned...
# extension module 'zlib' loaded from 'C:\msys64\tmp\_MEI133642\lib-dynload/
zlib-cpython-38.dll'
# extension module 'zlib' executed from 'C:\msys64\tmp\_MEI133642\lib-dynloa
d/zlib-cpython-38.dll'
import 'zlib' # 
[9392] LOADER: extracted pyimod03_importers
[9392] LOADER: callfunction returned...
[9392] LOADER: Installing PYZ archive with Python modules.
[9392] LOADER: PYZ archive: PYZ-00.pyz
[9392] LOADER: Running pyiboot01_bootstrap.py
# PyInstaller: FrozenImporter(C:\Users\Χρήστος\Desktop\dist3456.exe?7057213)
# os not found in PYZ
# code object from 'C:\msys64\tmp\_MEI133642/os.pyc'
# stat not found in PYZ
# code object from 'C:\msys64\tmp\_MEI133642/stat.pyc'
import '_stat' # 
import 'stat' # 
# _collections_abc not found in PYZ
import _collections_abc # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.
zip/_collections_abc.pyc
# ntpath not found in PYZ
# code object from 'C:\msys64\tmp\_MEI133642/ntpath.pyc'
# genericpath not found in PYZ
# code object from 'C:\msys64\tmp\_MEI133642/genericpath.pyc'
import 'genericpath' # 
import 'ntpath' # 
import 'os' # 
# ctypes not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/ctypes/__init__.pyc'
# _ctypes not found in PYZ
# extension module '_ctypes' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/_
ctypes-cpython-38.dll'
# extension module '_ctypes' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload
/_ctypes-cpython-38.dll'
import '_ctypes' # 
# ctypes._endian not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/ctypes/_endian.pyc'
import 'ctypes._endian' # 
import 'ctypes' # 
[9392] LOADER: Running pyi_rth_multiprocessing.py
# re not found in PYZ
# enum not found in PYZ
# types not found in PYZ
import types # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/types.p
yc
import enum # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/enum.pyc
# sre_compile not found in PYZ
import '_sre' # 
# sre_parse not found in PYZ
# sre_constants not found in PYZ
import sre_constants # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip
/sre_constants.pyc
import sre_parse # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/sre
_parse.pyc
import sre_compile # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/s
re_compile.pyc
# functools not found in PYZ
# collections not found in PYZ
# operator not found in PYZ
import '_operator' # 
import operator # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/oper
ator.pyc
# keyword not found in PYZ
import keyword # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/keywo
rd.pyc
# heapq not found in PYZ
# _heapq not found in PYZ
# extension module '_heapq' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/_h
eapq-cpython-38.dll'
# extension module '_heapq' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload/
_heapq-cpython-38.dll'
import '_heapq' # 
import heapq # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/heapq.p
yc
import 'itertools' # 
# reprlib not found in PYZ
import reprlib # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/reprl
ib.pyc
import '_collections' # 
import collections # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/c
ollections/__init__.pyc
import '_functools' # 
import functools # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/fun
ctools.pyc
import '_locale' # 
# copyreg not found in PYZ
import copyreg # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/copyr
eg.pyc
import re # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/re.pyc
# multiprocessing not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/__init__.pyc'
# multiprocessing.context not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/context.pyc'
# threading not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/threading.pyc'
# _weakrefset not found in PYZ
import _weakrefset # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/_
weakrefset.pyc
import 'threading' # 
# multiprocessing.process not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/process.pyc'
# signal not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/signal.pyc'
import 'signal' # 
import 'multiprocessing.process' # 
# multiprocessing.reduction not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/reduction.pyc'
# pickle not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/pickle.pyc'
# _compat_pickle not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/_compat_pickle.pyc'
import '_compat_pickle' # 
# _pickle not found in PYZ
# extension module '_pickle' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/_
pickle-cpython-38.dll'
# extension module '_pickle' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload
/_pickle-cpython-38.dll'
import '_pickle' # 
# org not found in PYZ
import 'pickle' # 
# socket not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/socket.pyc'
# _socket not found in PYZ
# extension module '_socket' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/_
socket-cpython-38.dll'
# extension module '_socket' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload
/_socket-cpython-38.dll'
import '_socket' # 
# selectors not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/selectors.pyc'
# collections.abc not found in PYZ
import collections.abc # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.z
ip/collections/abc.pyc
# math not found in PYZ
# extension module 'math' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/math
-cpython-38.dll'
# extension module 'math' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload/ma
th-cpython-38.dll'
import 'math' # 
# select not found in PYZ
# extension module 'select' loaded from 'C:/msys64/tmp/_MEI133642/lib-dynload/se
lect-cpython-38.dll'
# extension module 'select' executed from 'C:/msys64/tmp/_MEI133642/lib-dynload/
select-cpython-38.dll'
import 'select' # 
import 'selectors' # 
import 'errno' # 
import 'socket' # 
import '_winapi' # 
import 'multiprocessing.reduction' # 
import 'multiprocessing.context' # 
import 'multiprocessing' # 
# multiprocessing.spawn not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/spawn.pyc'
# runpy not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/runpy.pyc'
# importlib not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/importlib/__init__.pyc'
# warnings not found in PYZ
import warnings # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/warn
ings.pyc
import 'importlib' # 
# importlib.machinery not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/importlib/machinery.pyc'
import 'importlib.machinery' # 
# importlib.util not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/importlib/util.pyc'
# importlib.abc not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/importlib/abc.pyc'
import 'importlib.abc' # 
# contextlib not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/contextlib.pyc'
import 'contextlib' # 
import 'importlib.util' # 
# pkgutil not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/pkgutil.pyc'
# weakref not found in PYZ
import weakref # loaded from Zip C:/msys64/tmp/_MEI133642/base_library.zip/weakr
ef.pyc
import 'pkgutil' # 
import 'runpy' # 
# multiprocessing.util not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/util.pyc'
import 'atexit' # 
# subprocess not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/subprocess.pyc'
import 'msvcrt' # 
import 'subprocess' # 
import 'multiprocessing.util' # 
import 'multiprocessing.spawn' # 
# multiprocessing.popen_spawn_win32 not found in PYZ
# code object from 'C:/msys64/tmp/_MEI133642/multiprocessing/popen_spawn_win32.p
yc'
import 'multiprocessing.popen_spawn_win32' # 
[9392] LOADER: Running 123456.py
# pytube not found in PYZ
Traceback (most recent call last):
  File "123456.py", line 1, in 
  File "", line 991, in _find_and_load
  File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pytube'
[9392] Failed to execute script 123456
[9392] LOADER: OK.
[9392] LOADER: Manually flushing stdout and stderr
[9392] LOADER: Cleaning up Python interpreter.
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing sys
# cleanup[2] removing builtins
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing _imp
# cleanup[2] removing _warnings
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing _io
# cleanup[2] removing marshal
# cleanup[2] removing nt
# cleanup[2] removing _thread
# cleanup[2] removing _weakref
# cleanup[2] removing winreg
# cleanup[2] removing time
# cleanup[2] removing zipimport
# cleanup[2] removing _codecs
# cleanup[2] removing codecs
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing encodings.cp1253
# cleanup[2] removing _signal
# cleanup[2] removing __main__
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing _abc
# cleanup[2] removing abc
# cleanup[2] removing io
# cleanup[2] removing struct
# cleanup[2] removing _struct
# cleanup[2] removing pyimod01_os_path
# cleanup[2] removing pyimod02_archive
# cleanup[2] removing zlib
# cleanup[2] removing pyimod03_importers
# cleanup[2] removing _stat
# cleanup[2] removing stat
# cleanup[2] removing _collections_abc
# cleanup[2] removing genericpath
# cleanup[2] removing ntpath
# cleanup[2] removing os.path
# cleanup[2] removing os
# cleanup[2] removing _ctypes
# cleanup[2] removing ctypes._endian
# cleanup[2] removing ctypes
# cleanup[2] removing types
# cleanup[2] removing enum
# cleanup[2] removing _sre
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing sre_parse
# cleanup[2] removing sre_compile
# cleanup[2] removing _operator
# cleanup[2] removing operator
# destroy operator
# cleanup[2] removing keyword
# destroy keyword
# cleanup[2] removing _heapq
# cleanup[2] removing heapq
# cleanup[2] removing itertools
# cleanup[2] removing reprlib
# destroy reprlib
# cleanup[2] removing _collections
# cleanup[2] removing collections
# destroy collections
# cleanup[2] removing _functools
# cleanup[2] removing functools
# cleanup[2] removing _locale
# cleanup[2] removing copyreg
# cleanup[2] removing re
# cleanup[2] removing _weakrefset
# destroy _weakrefset
# cleanup[2] removing threading
# cleanup[2] removing signal
# cleanup[2] removing multiprocessing.process
# cleanup[2] removing _compat_pickle
# cleanup[2] removing _pickle
# cleanup[2] removing pickle
# cleanup[2] removing _socket
# cleanup[2] removing collections.abc
# cleanup[2] removing math
# cleanup[2] removing select
# cleanup[2] removing selectors
# cleanup[2] removing errno
# cleanup[2] removing socket
# cleanup[2] removing _winapi
# cleanup[2] removing multiprocessing.reduction
# cleanup[2] removing multiprocessing.context
# cleanup[2] removing __mp_main__
# destroy __main__
# cleanup[2] removing multiprocessing
# cleanup[2] removing importlib._bootstrap
# cleanup[2] removing importlib._bootstrap_external
# cleanup[2] removing warnings
# cleanup[2] removing importlib
# cleanup[2] removing importlib.machinery
# cleanup[2] removing importlib.abc
# cleanup[2] removing contextlib
# cleanup[2] removing importlib.util
# cleanup[2] removing weakref
# cleanup[2] removing pkgutil
# destroy pkgutil
# cleanup[2] removing runpy
# cleanup[2] removing atexit
# cleanup[2] removing msvcrt
# cleanup[2] removing subprocess
# destroy subprocess
# cleanup[2] removing multiprocessing.util
# cleanup[2] removing multiprocessing.spawn
# cleanup[2] removing multiprocessing.popen_spawn_win32
# cleanup[3] wiping multiprocessing.popen_spawn_win32
# cleanup[3] wiping multiprocessing.spawn
# destroy runpy
# cleanup[3] wiping multiprocessing.util
# destroy weakref
# cleanup[3] wiping msvcrt
# cleanup[3] wiping atexit
# destroy atexit
# cleanup[3] wiping importlib.util
# cleanup[3] wiping contextlib
# cleanup[3] wiping importlib.abc
# cleanup[3] wiping importlib.machinery
# cleanup[3] wiping importlib
# destroy importlib.machinery
# destroy importlib.abc
# destroy importlib.util
# cleanup[3] wiping warnings
# cleanup[3] wiping importlib._bootstrap_external
# cleanup[3] wiping importlib._bootstrap
# cleanup[3] wiping multiprocessing
# destroy multiprocessing.util
# cleanup[3] wiping multiprocessing.context
# destroy multiprocessing.process
# destroy multiprocessing.reduction
# cleanup[3] wiping _winapi
# cleanup[3] wiping socket
# destroy selectors
# cleanup[3] wiping errno
# cleanup[3] wiping select
# cleanup[3] wiping math
# cleanup[3] wiping collections.abc
# cleanup[3] wiping _socket
# destroy _socket
# cleanup[3] wiping pickle
# destroy _compat_pickle
# cleanup[3] wiping _pickle
# cleanup[3] wiping signal
# cleanup[3] wiping threading
# cleanup[3] wiping re
# destroy enum
# destroy sre_compile
# cleanup[3] wiping copyreg
# cleanup[3] wiping _locale
# destroy _locale
# cleanup[3] wiping functools
# cleanup[3] wiping _functools
# destroy _functools
# cleanup[3] wiping _collections
# cleanup[3] wiping itertools
# cleanup[3] wiping heapq
# cleanup[3] wiping _heapq
# destroy _heapq
# cleanup[3] wiping _operator
# cleanup[3] wiping sre_parse
# cleanup[3] wiping _sre
# cleanup[3] wiping types
# cleanup[3] wiping ctypes
# destroy ctypes._endian
# cleanup[3] wiping _ctypes
# cleanup[3] wiping os
# destroy ntpath
# cleanup[3] wiping genericpath
# cleanup[3] wiping _collections_abc
# cleanup[3] wiping stat
# cleanup[3] wiping _stat
# destroy _stat
# cleanup[3] wiping pyimod03_importers
# cleanup[3] wiping zlib
# cleanup[3] wiping pyimod02_archive
# destroy zlib
# cleanup[3] wiping pyimod01_os_path
# cleanup[3] wiping _struct
# cleanup[3] wiping struct
# destroy _struct
# cleanup[3] wiping io
# destroy abc
# cleanup[3] wiping _abc
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping _signal
# destroy _signal
# cleanup[3] wiping encodings.cp1253
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping encodings
# destroy codecs
# destroy encodings.aliases
# destroy encodings.utf_8
# destroy encodings.cp1253
# destroy encodings.latin_1
# cleanup[3] wiping _codecs
# cleanup[3] wiping zipimport
# destroy _frozen_importlib_external
# cleanup[3] wiping time
# cleanup[3] wiping winreg
# destroy winreg
# cleanup[3] wiping _weakref
# cleanup[3] wiping _thread
# cleanup[3] wiping nt
# cleanup[3] wiping marshal
# cleanup[3] wiping _io
# destroy io
# cleanup[3] wiping _warnings
# cleanup[3] wiping _imp
# destroy _imp
# cleanup[3] wiping _frozen_importlib
# cleanup[3] wiping sys
# cleanup[3] wiping builtins
# destroy _abc
# destroy stat
# destroy genericpath
# destroy encodings
# destroy ctypes
# destroy re
# destroy multiprocessing
# destroy multiprocessing.spawn
# destroy multiprocessing.popen_spawn_win32
# destroy errno
# destroy contextlib
# destroy time
# destroy msvcrt
# destroy _warnings
# destroy _sre
# destroy sre_parse
# destroy signal
# destroy threading
# destroy copyreg
# destroy functools
# destroy pickle
# destroy socket
# destroy multiprocessing.context
# destroy _winapi
# destroy io
# destroy types
# destroy _pickle
# destroy nt
# destroy _operator
# destroy heapq
# destroy _collections
# destroy collections.abc
# destroy _thread
# destroy _weakref
# destroy _collections_abc
# destroy itertools
# destroy importlib
# destroy os
# destroy warnings
# destroy zipimport
# destroy math
# destroy select
# destroy _frozen_importlib
# clear sys.audit hooks
[13364] LOADER: Back to parent (RC: 1)
[13364] LOADER: Doing cleanup
[13364] LOADER: Freeing archive status for C:\Users\╫±▐≤ΪΎ≥\Desktop\dist3456.
exe

msys2 mingw64 下 windows10 中的所有内容。

怎么了? 任何建议都会有用。

我不太清楚你的 PyInstaller 命令有什么问题,但也许你可以试试 Auto-Py-To-Exe 工具。我发现它真的很有帮助。 这是一个图形用户界面,您可以在其中 select 所有您想要的选项。 您可以使用

安装它
C:\Users\YourUser> pip install auto-py-to-exe

和运行它与

C:\Users\YourUser> auto-py-to-exe 

希望能帮到你