Reputation: 125
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).
Upvotes: 0
Views: 2565
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