简体   繁体   English

cx_Freeze ImportError: DLL load failed while importing _ctypes: 找不到指定的模块

[英]cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

I compiled some Python scripts with cx_Freeze but compiled scripts giving me this error:我用 cx_Freeze 编译了一些 Python 脚本,但编译的脚本给了我这个错误:

点击查看错误

setup.py:

from cx_Freeze import setup, Executable

executables = [
    Executable('USBAIO.py', base="Win32GUI", icon="Icons\\icon.ico"),
    Executable('ui.py', base="Win32GUI", icon="Icons\\icon.ico"),
    Executable("formatter.py", base="Win32GUI", icon="Icons\\cicon.ico"),
    Executable("updater.py", base="Win32GUI", icon="Icons\\uicon.ico"),
    Executable("permremove.py", base="Win32GUI", icon="Icons\\cicon.ico")
    ]

Packages = ["tkinter","functools", "time", "win32api",
                    "threading", "subprocess", "psutil", "os",
                    "shutil", "re", "requests", "sys", "ctypes",
                    "argparse", "google_drive_downloader",
                    "win32file", "win32con"
                    ]

Include = ["Icons", "version.txt", "icon.ico"]

setup(
    name="myapp",
    options={"build_exe":{"packages":Packages,"include_files":Include}},
    description = "myapp",
    executables = executables
)

Python version: 3.8 Python 版本:3.8

Windows: 8.1 Pro WMC Windows:8.1 专业版 WMC

cx_Freeze: 6.0b1 cx_Freeze:6.0b1

Well, I found the answer.嗯,我找到了答案。 The error caused by a DLL that cx_Freeze couldn't grab.由 cx_Freeze 无法抓取的 DLL 引起的错误。 When I copy the libffi-7.dll to lib folder my application works fine.当我将libffi-7.dll复制到lib文件夹时,我的应用程序工作正常。 Here is my research: research这是我的研究:研究

I had the same issue.我遇到过同样的问题。 It was caused by using conda install pyqt.这是由使用 conda install pyqt 引起的。

Uninstalling it and reinstalling using conda install -c anaconda pyqt fixed it.卸载它并使用 conda install -c anaconda pyqt 重新安装修复它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python 3.3.4 Cx_Freeze ImportError:DDL加载失败:找不到指定的模块 - Python 3.3.4 Cx_Freeze ImportError: DDL load failed: The specified module could not be found 导入错误:DLL 导入时加载失败 _ctypes:找不到指定的模块 - ImportError: DLL load failed while importing _ctypes : The specified module could not be found cx_Freeze导入错误:DLL加载失败:找不到指定的模块 - cx_Freeze Import Error: DLL load failed: The specified module could not be found 当使用cx_Freeze和tkinter时,我得到:“DLL加载失败:找不到指定的模块。”(Python 3.5.3) - When using cx_Freeze and tkinter I get: “DLL load failed: The specified module could not be found.” (Python 3.5.3) 导入 Cartopy 时 ImportError: DLL load failed while importing trace: The specified module could not be found - When importing Cartopy ImportError: DLL load failed while importing trace: The specified module could not be found 导入 Dash 时出错:“ImportError: DLL load failed while importing _brotli: The specified module could not be found.” - Error when importing Dash: "ImportError: DLL load failed while importing _brotli: The specified module could not be found." (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found - (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found 导入错误:导入 _openmp_helpers 时 DLL 加载失败:找不到指定的模块 - ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found ImportError: DLL load failed while importing pymqe: The specified module could not be found - ImportError: DLL load failed while importing pymqe: The specified module could not be found 在pycharm ImportError中:DLL加载失败:找不到指定的模块。 导入人脸识别时 - In pycharm ImportError: DLL load failed: The specified module could not be found. while importing facerecognition
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM