With PyQt5.2 there is a problem in the way that the PyQt modules are built
that causes cx_freeze to stop with an error because a .dylib cannot be
found.

If cx_freeze terminates with a message like:

> FileNotFoundError: [Errno 2] No such file or directory: 'libQtCore.dylib'

then cd into the location for the PyQt5 modules, probably

>
/Library/Frameworks/Python.framework/Versions/Current/lib/python3.3/site-packages/PyQt5

and use the otool command to display their depencies, e.g.

> $ otool -L ./QtCore.so
> ./QtCore.so:
>     libQtCore.dylib (compatibility version 0.0.0, current version 0.0.0)
>     /usr/local/Qt-5.2.0/lib/QtCore.framework/Versions/5/QtCore
(compatibility version 5.2.0, current version 5.2.0)
>     /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 60.0.0)
>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1197.1.1)

There is an apparent dependency on libQtCore.dylib but this is an artifact
of the way the module was built. This should be corrected in a future
release of PyQt5. But for now, apply the following command:

> $ sudo install_name_tool -id $PWD/QtCore.so QtCore.so

(install_name_tool is  part of the XCode package.) Afterward, the otool
display is:

> $  otool -L ./QtCore.so
> ./QtCore.so:
>
/Library/Frameworks/Python.framework/Versions/Current/lib/python3.3/site-packages/PyQt5/QtCore.so
(compatibility version 0.0.0, current version 0.0.0)
>    /usr/local/Qt-5.2.0/lib/QtCore.framework/Versions/5/QtCore
(compatibility version 5.2.0, current version 5.2.0)
>    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current
version 60.0.0)
>    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1197.1.1)

This has to be done for each module the frozen app imports, QtWidgets,
QtWebKit, etc.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to