On 16/01/15 08:36, David Cortesi wrote:
> I said that under Python 3, pyinstaller made a one-folder bundle of my PyQt5
> app
> that failed with the message,
>
>> This application failed to start because it could not find or load the Qt
> platform plugin "cocoa".
>
> Glenn Ramsey said,
>
>> On my builds of a working app the libqcocoa.dylib file goes here:
>> Contents/MacOS/qt5_plugins/platforms
>> Pyinstaller does this for me, though.
>
> It does it for me, too. Well, it copies into the dist folder, "libqcocoa" (no
> suffix). I manually copied in "libqcocoa.dylib" from the Qt5.4 distribution
> also, but the app terminates the same way.
You can't do that. You need to rewrite all of the dependency paths. On my build
it looks like this:
My.app/Contents/MacOS/qt5_plugins/platforms$ otool -L libqcocoa.dylib
libqcocoa.dylib:
@loader_path/../../libqcocoa.dylib (compatibility version 0.0.0, current
version 0.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility
version 1.0.0, current version 19.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility
version 2.0.0, current version 155.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
(compatibility
version 1.0.0, current version 275.0.0)
@loader_path/../../QtPrintSupport (compatibility version 5.2.0, current
version
5.2.1)
@loader_path/../../QtWidgets (compatibility version 5.2.0, current
version 5.2.1)
@loader_path/../../QtGui (compatibility version 5.2.0, current version
5.2.1)
@loader_path/../../QtCore (compatibility version 5.2.0, current version
5.2.1)
@loader_path/../../libz.1.dylib (compatibility version 1.0.0, current
version
1.2.8)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility
version 1.0.0, current version 1.0.0)
@loader_path/../../libgthread-2.0.0.dylib (compatibility version
3801.0.0,
current version 3801.2.0)
@loader_path/../../libglib-2.0.0.dylib (compatibility version 3801.0.0,
current
version 3801.2.0)
@loader_path/../../libintl.8.dylib (compatibility version 10.0.0,
current
version 10.2.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 45.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility
version
1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
65.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 169.3.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version
228.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 150.0.0, current version 744.18.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
(compatibility
version 45.0.0, current version 1187.37.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
(compatibility version 1.0.0, current version 57.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version 300.0.0, current version 945.16.0)
>
> I do not know where this request is coming from, because I executed the
> following in the dist folder:
>
> otool -L * | grep ocoa
>
> and the only files that mentioned Cocoa or cocoa as an id or a link were cocoa
> itself (which is there) and libqcocoa and libqcocoa.dylib. And then only in
> the
> first line, which is the lib's id, not a link; or as a link to
> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa, which definitely
> exists.
It is probably not finding the Qt framework binaries. PyInstaller puts them in
Contents/MacOS without a suffix as you can see in the listing above.
Glenn
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.