I’m working on a control tool that uses Phidget22 to handle some hardware. Everything runs fine when I launch it with Python (Ubuntu 22.04, Python 3.10), but once I freeze it with cx_Freeze, the binary crashes at startup with:
Code: Select all
Failed to load dynlib/dll 'libphidget22.so'
Here’s the setup.py I’m using:
Code: Select all
from cx_Freeze import setup, Executable
build_exe_options = {
"packages": ["Phidget22", "asyncio", "logging", "requests", "json"],
"include_files": [
("/usr/lib/libphidget22.so", "libphidget22.so"),
("config.json", "config.json"),
],
}
setup(
name="control_center",
version="1.4.2",
description="Hardware monitoring tool using Phidget22",
author="Engineering Team",
options={"build_exe": build_exe_options},
executables=[Executable("main.py", target_name="control_center")],
)
Everything else works fine, except for the part that communicates with the Phidget devices.
Has anyone run into this with cx_Freeze on Linux?