I am experimenting with bundling an app based on Python3.4 and PyQt5.4
under Mac OSX 10.10. (so, really really up to date, eh?)

My app terminates with the message,

This application failed to start because it could not find or load the Qt
> platform plugin "cocoa".
>
Reinstalling the application may fix this problem.
>
Abort trap: 6
>

(so, probably a Qt message)

The app runs correctly from the command line or in an IDE. I see a file
libqcocoa.dylib in the Qt5.4 plugins directory. However, copying that into
the bundle folder does not change the result.

I modified the spec file as follows:

coll = COLLECT(exe,
>                a.binaries+[
>
> ('cocoa','/Developer/5.4/clang_64/plugins/platforms/libqcocoa.dylib','BINARY'),
>
> ('libqcocoa','/Developer/5.4/clang_64/plugins/platforms/libqcocoa.dylib','BINARY')
>
               ],
>
... etc)
>

and this does copy the file into dist/appname (twice) but the app still
terminates with the message above. So Qt is not looking for the lib there.

Searching on the message text produces many hits in many different apps.
The post at [1] offers the solution of changing the source code to tell the
QApplication to look for plugins in the app folder AND going through a lot
of rigamarole with an XCode utility called install_name_tool to modify the
plugins after they are copied.

Any simpler suggestions are welcome!

Thanks for your time,

Dave Cortesi

[1] http://qt-project.org/forums/viewthread/26446

-- 
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.

Reply via email to