擅长:python、mysql、java
<p>在我的环境中复制了这个问题。在</p>
<p>请试试我的设置.py在</p>
<pre><code>import sys
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
"packages": ["idna","lxml"],
"includes": ["urllib3","queue"],
"excludes": ["tkinter"],
# "include_files":[('./platforms','./platforms')] # uncomment if need qwindows.dll for qt5 application, you need put qwindows.dll in "./platforms" folder.
}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "demo",
version = "0.1",
description = "demo",
options = {"build_exe": build_exe_options},
executables = [Executable("demo.py", base=base)])
</code></pre>
<p><strong>根本原因</strong>缺少目标文件夹中的<code>lxml</code>包。
您需要在下面的生成选项中指定包。在</p>
^{pr2}$