我正在为Windows创建kivy可执行文件。我的应用程序包含matplotlib图。 python文件运行正常。但是创建可执行文件后,当我尝试运行exe文件时,出现以下错误-
Traceback (most recent call last):
File "myfile.py", line 1, in <module>
from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg
File "\kivy_venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\kivy\garden\matplotlib\__init__.py", line 1, in <module>
'''
File "\kivy_venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\kivy\garden\matplotlib\backend_kivy.py", line 244, in <module>
File "\kivy_venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\matplotlib\__init__.py", line 121, in <module>
def __init__(self, **kwargs):
ModuleNotFoundError: No module named 'distutils'
[13504] Failed to execute script myfile