【问题标题】:How to add DLL file to pyinstaller packaging?如何将 DLL 文件添加到 pyinstaller 打包?
【发布时间】:2020-11-25 14:13:23
【问题描述】:

问题:如何在 Pyinstaller 中指定添加 (dll) 文件进行编译,否则无法找到?目标是拥有一个工作的 .exe 文件。

背景:我正在尝试使用 Pyinstaller (Windows 10) 编译 Python 应用程序。代码在编译前执行良好。

import teradatasql

# ESTABLISH CONNECTION
con =  teradatasql.connect(host='myhostaddress', 
            user='myuser',
            password='mypass'
            )

问题:但是,在编译后似乎,回溯​​提到“teradatasql.dll”文件丢失(大概这是.exe失败的原因执行)。

.

【问题讨论】:

    标签: python-3.x pyinstaller python-packaging


    【解决方案1】:

    我的一个团队成员写了一封blog post about how to use PyInstaller to package the Teradata SQL Driver for Python

    您需要指定 PyInstaller 的 --add-binary 选项和 teradatasql.dll 文件的路径参数。

    【讨论】:

      猜你喜欢
      • 2020-05-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-12
      • 1970-01-01
      • 2022-10-04
      • 2018-02-06
      • 1970-01-01
      • 2020-06-26
      相关资源
      最近更新 更多