cx_Freeze ImportError: No module named 'kivy-deps.gstreamer'
cx_Freeze ImportError: No module named 'kivy-deps.gstreamer'
我正在尝试通过 cx_Freeze 从我的 python 代码创建一个 exe 文件。
当我 运行 我的 setup.py 文件(您可以在下面查看)时,我收到一条错误消息:
ImportError: No module named 'kivy-deps.gstreamer'
你能告诉我我做错了什么吗?
(安装了kivy-deps.gstreamer,我也重新安装了确定)
提前致谢...
import sys
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["kivy","pygame","kivy-deps.gstreamer"], "includes": ["PIL","wheel","setuptools",], "excludes": []}
base = None
#if sys.platform == "win32":
# base = "Win32GUI"
setup(
name="guifoo",
version="0.1",
description="My GUI application!",
options={"build_exe": build_exe_options},
executables=[Executable("test.py", base=base)],
)
尝试在 build_exe_options
.
中使用 "kivy_deps.gstreamer"
(带下划线)而不是 "kivy-deps.gstreamer"
(带连字符)
相应的导入语句即为
import kivy_deps.gstreamer
没有
import kivy-deps.gstreamer
可能是因为在第二个语句中,连字符将被解释为减法运算符。
我正在尝试通过 cx_Freeze 从我的 python 代码创建一个 exe 文件。 当我 运行 我的 setup.py 文件(您可以在下面查看)时,我收到一条错误消息:
ImportError: No module named 'kivy-deps.gstreamer'
你能告诉我我做错了什么吗?
(安装了kivy-deps.gstreamer,我也重新安装了确定)
提前致谢...
import sys
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ["kivy","pygame","kivy-deps.gstreamer"], "includes": ["PIL","wheel","setuptools",], "excludes": []}
base = None
#if sys.platform == "win32":
# base = "Win32GUI"
setup(
name="guifoo",
version="0.1",
description="My GUI application!",
options={"build_exe": build_exe_options},
executables=[Executable("test.py", base=base)],
)
尝试在 build_exe_options
.
"kivy_deps.gstreamer"
(带下划线)而不是 "kivy-deps.gstreamer"
(带连字符)
相应的导入语句即为
import kivy_deps.gstreamer
没有
import kivy-deps.gstreamer
可能是因为在第二个语句中,连字符将被解释为减法运算符。