dady7749
dady7749

Reputation: 125

How to add DLL file to pyinstaller packaging?

Question: How do I specify in Pyinstaller to add a (dll) file to compile, that it otherwise cannot find? The goal is to have a working .exe file.

Background: I am trying to compile a Python app with Pyinstaller (Windows 10). The code executes fine before compilation.

import teradatasql

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

Problem: However, after compiling it seems that the traceback mentions that the "teradatasql.dll" file is missing (presumably this is the causes for the .exe failing to execute).

traceback.

Upvotes: 0

Views: 2565

Answers (1)

Tom Nolan
Tom Nolan

Reputation: 450

One of my team members wrote a blog post about how to use PyInstaller to package the Teradata SQL Driver for Python.

You need to specify PyInstaller's --add-binary option with a path argument for the teradatasql.dll file.

Upvotes: 1

Related Questions