Almar Klein | 20 Nov 15:46 2012

cx_Freeze-ing an app on Linux with PySide


I ran into some problems trying to build an application that uses PySide. Running Python 3.2 on Linux (Lucid Lynx) with Qt and PySide compiled from source.

The problem is that even though and friends are copied to the target directory, the extension modules (e.g. are unable to find them. The reason (which I found out eventually) is that on Linux the dependency is not searched in the directory of the calling library by default. 

The solution is to set the RPATH variable in the libraries that have the dependencies. Set it to '$ORIGIN' to make Linux search in the same directory. You can also specify paths relative to $ORIGIN.

On Linux the RPATH can be changed with the 'patchelf' util, which actually comes with PySide. I read that for Mac there are similar solutions.

My problem is solved, but I was wondering if others have ran into the same problems. If so, maybe we can include this functionality in cx_Freeze. (But let's wait until after the release that you are currently wrapping up).

- Almar

Almar Klein, PhD
Science Applied
phone: +31 6 19268652
e-mail: a.klein <at>

Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
cx-freeze-users mailing list
cx-freeze-users <at>