Python 将cx#U冻结与feedparser导入一起使用时出错:ModuleNotFoundError:没有名为'的模块;sgmllib&x27;

Python 将cx#U冻结与feedparser导入一起使用时出错:ModuleNotFoundError:没有名为'的模块;sgmllib&x27;,python,cx-freeze,feedparser,Python,Cx Freeze,Feedparser,我正在尝试使用cx_freeze来冻结使用Feedparser的应用程序。如果我使用python从命令行启动该应用程序,它就可以完美地工作。但是,当我尝试使用cx_freeze冻结它时,在我尝试启动应用程序之前不会出现错误。然后我得到: Traceback (most recent call last): File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/__startup__.py

我正在尝试使用cx_freeze来冻结使用Feedparser的应用程序。如果我使用python从命令行启动该应用程序,它就可以完美地工作。但是,当我尝试使用cx_freeze冻结它时,在我尝试启动应用程序之前不会出现错误。然后我得到:

Traceback (most recent call last):
  File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/__startup__.py", line 66, in run
    module.run()
  File "/home/ricky/.local/lib/python3.9/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run
    exec(code, m.__dict__)
  File "main.py", line 8, in <module>
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/__init__.py", line 28, in <module>
    from .api import parse
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/api.py", line 36, in <module>
    from .html import _BaseHTMLProcessor
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/html.py", line 31, in <module>
    from .sgml import *
  File "/home/ricky/.local/lib/python3.9/site-packages/feedparser/sgml.py", line 30, in <module>
    import sgmllib
ModuleNotFoundError: No module named 'sgmllib'
回溯(最近一次呼叫最后一次):
文件“/home/ricky/.local/lib/python3.9/site packages/cx\u Freeze/initscripts/\uuuuu startup\uuuuu.py”,第66行,正在运行
module.run()
文件“/home/ricky/.local/lib/python3.9/site packages/cx_Freeze/initscripts/Console.py”,第36行,正在运行
执行官(代码、指令)
文件“main.py”,第8行,在
文件“/home/ricky/.local/lib/python3.9/site packages/feedparser/\uuuuu init\uuuuuu.py”,第28行,在
从.api导入解析
文件“/home/ricky/.local/lib/python3.9/site packages/feedparser/api.py”,第36行,在
from.html导入\u BaseHTMLProcessor
文件“/home/ricky/.local/lib/python3.9/site packages/feedparser/html.py”,第31行,在
从.sgml导入*
文件“/home/ricky/.local/lib/python3.9/site packages/feedparser/sgml.py”,第30行,在
导入sgmllib
ModuleNotFoundError:没有名为“sgmllib”的模块

我知道Python3中不再使用sgmllib,但由于我从命令行启动它时没有遇到此错误,因此它似乎不是feedparser问题。有什么想法吗?

cx\u Freeze开发人员在Github上帮助我解决了同样的问题

谢谢大家!!抱歉,我没有足够的代表将答案标记为有用,但这有帮助。我更新到最新的cx_冻结和安装的车轮和一切建设好。然而,现在当我启动应用程序时,我得到了“分段错误(核心转储)”。有什么想法吗?我还没犯这个错误。您必须检查这是编译错误还是cx\U冻结错误。但我认为这就是我有用的地方:(