【问题标题】:Python: How to fix an error of VCRUNTIME140.dllPython:如何修复 VCRUNTIME140.dll 的错误
【发布时间】:2021-12-22 19:16:05
【问题描述】:

我用 python 创建了一个桌面应用程序,就代码而言它运行良好。然后我使用 CX_Freeze 来获取一个可执行文件,以便在任何 PC 上使用它而无需安装任何东西,它也可以工作,但只能在我的 PC 上工作。 我想给你看我的 setup.py 文件:

from cx_Freeze import setup, Executable
import sys
base = None
if sys.platform == "win32":
    base = "Win32GUI"
executables = [Executable("general.py", base=base)]#, icon='accept.ico')]
#Renseignez ici la liste complète des packages utilisés par votre application
packages = ["idna", "__future__", "PyQt5","sys", "numpy", "cv2", "pyzbar", "validate_email", "urllib.request", "mysql.connector", "datetime", "face_recognition"]
options = {
    'build_exe': {
        'packages':packages,
        'include_files':['icones','TEACH_images']


    },
}

setup(
    name = "bis",
    options = options,
    version = "1.0",
    description = 'Voici mon programme',
    executables = executables
)

我在终端执行命令:python setup.py build。就像我说的一切都在我的电脑上运行,但我在其他电脑上得到错误:impossible d'executer le code car VCRUNTIME140.dll est introuvable 那么如何修复错误或者我应该使用其他方法还是我必须更改我的设置文件中的某些内容

【问题讨论】:

标签: python pyqt5 cx-freeze


【解决方案1】:
options = {
    'build_exe': {
        'packages':packages,
        'include_files':['icones','TEACH_images'],
         "include_msvcr": True


    },

你的选项部分应该是这样的。

【讨论】:

    猜你喜欢
    • 2011-02-20
    • 2017-01-30
    • 2017-02-27
    • 2019-04-07
    • 2016-03-16
    • 2016-12-24
    • 2016-04-01
    • 1970-01-01
    相关资源
    最近更新 更多