#pyinstaller运行后提示报错,无法解决
#Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python311\Scripts\pyinstaller.exe_main.py", line 7, in
File "C:\Python311\Lib\site-packages\PyInstaller_main.py", line 214, in console_script_run
run()
^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller_main.py", line 170, in run
parser = generate_parser()
^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller_main_.py", line 136, in generate_parser
import PyInstaller.building.build_main
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\building\build_main.py", line 28, in
from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\building\api.py", line 32, in
from PyInstaller.building.splash import Splash # argument type validation in EXE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\building\splash.py", line 23, in
from PyInstaller.depend import bindepend
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\bindepend.py", line 25, in
from PyInstaller.depend import dylib, utils
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\utils.py", line 28, in
from PyInstaller.depend import bytecode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\bytecode.py", line 120, in
_cache_instruction_filter = bytecode_regex(rb"(CACHE.)|(..)")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\bytecode.py", line 53, in bytecode_regex
pattern = re.sub(
^^^^^^^
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\bytecode.py", line 55, in
lambda m: _instruction_to_regex(m[1].decode()),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\PyInstaller\depend\bytecode.py", line 36, in _instruction_to_regex
return re.escape(bytes([opmap[x]]))
~~~~~^^^
KeyError: 'CACHE'