使用cx_freeze创建exe时发生ModuleNotFoundError

时间:2020-03-30 23:07:58

标签: python anaconda cx-freeze miniconda

我已经在miniconda中使用了cx_freeze几个月了,并且没有任何问题。然后我的公司卸载了miniconda并实施了Anaconda。现在,每当我运行cx_freeze时,都会出现以下错误。

我要转换为exe的.py文件的名称是QRCodeCreateAndPrint3.1.py

这是我的Setup.py

import cx_Freeze
import os
from cx_Freeze import *
import sys
if sys.platform == "win32":
     base = "Win32GUI"

imodules=['tkinter','qrcode','PIL','pyodbc','tkcalendar','datetime','os','win32print','win32ui','getpass','tempfile'] #modules to include

emodules=[] ###modules to NOT include
            #(useful if a module is forcefully installed
            #even if you don't want that module)



build_exe_options={"packages":imodules,"excludes":emodules}

setup(
        name= "QR Code Create and Print v 3.1",
        options={"build_exe":build_exe_options},description="App to print QR Codes",author="VM",
        executables=[
        Executable(
                 "QRCodeCreateAndPrint3.1.py", base=base, icon="QRCodeIcon.ico"
                )
            ]
        )


Error

是什么原因造成的?

0 个答案:

没有答案