我对cx_Freeze很新,但是当我尝试使用pyHooks时,它不起作用。 这是我的setup.py代码:
from cx_Freeze import setup, Executable
includes=["re", "pyHook"]
exe = Executable(
script="hello.py",
base="Win32Gui",
targetName = "hello.exe"
)
setup(
name = "hello",
version = "1",
description = "description",
options = {"build_exe": {"includes":includes}},
executables = [exe]
)
当我运行exe文件时,错误显示:
ImportError:无法导入名称cpyHook
答案 0 :(得分:2)
好的一个解决方法是手动包含browser.waitUntil(() => {
return browser.getUrl().then((pageUrl) => {
return pageUrl.indexOf('project') > -1
});
}, 5000)
。
cpyHook.py
您可以在options = {"build_exe": {"includes":includes, 'include_files': ['cpyHook.py']}},
cpyHook.py