cx_Freeze: Python error main script. Module not found error: no module named pygments.lexers.python

cx_Freeze: Python error main script. Module not found error: no module named pygments.lexers.python

我正在尝试使用 cx_Freeze.py 文件创建文件 .exe。我已经成功构建了安装文件,但是当我 运行 .exe 文件时,它 returns 我这个错误:

-我尝试重新安装Python

-我尝试更新 pygments 但它说要求已经满足

有什么建议吗?帮助这个可怜的新生程序员

您需要在 cx 冻结包中手动包含缺少的模块。请在此处参考答案以获取示例代码 -