使用python toga寫一個GUI程式,使用pyinstaller打包完後執行程式跑出以下錯誤
Traceback (most recent call last):
File "app.py", line 1, in <module>
File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
File "toga\__init__.py", line 118, in <module>
File "toga\__init__.py", line 115, in _package_version
File "importlib\metadata\__init__.py", line 996, in version
File "importlib\metadata\__init__.py", line 969, in distribution
File "importlib\metadata\__init__.py", line 548, in from_name
importlib.metadata.PackageNotFoundError: No package metadata was found for toga-core
[1764] Failed to execute script 'app' due to unhandled exception!
(程式沒包之前都可以正常執行。改成官方的hello world!試過了包之後還是會出現上述問題)
作業系統Windows11
python版本3.10.11
toga版本0.3.1
pyinstaller版本5.10.1
對於打包這部分不是很熟悉,請各位大大解惑