Diese Anwendung konnte nicht gestartet werden, da das Qt-Plattform-Plugin „cocoa“ nicht gefunden oder geladen werden konnte.
Ich glaube, ich habe in den letzten 20 Stunden alles getan, aber nichts scheint zu funktionieren. Meine App läuft und funktioniert - so wie es sollte - das einzige Problem, das ich habe, ist, dass ich keine erstellen kann.app
daraus bündeln. Ich habe beides versuchtPy2App
undcx_Freeze
aber keiner von ihnen funktioniert. Wegen der Multi-Plattform-Unterstützung würde ich mich - wenn möglich - an Letzteres halten.
Dassetup.py
sieht aus wie das:
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
OPTIONS = {'build_exe': {'includes': ['sip',
'PyQt5',
'PyQt5.QtCore',
'PyQt5.QtGui',
'PyQt5.QtWidgets',
'PyQt5.QtMultimediaWidgets',
'PyQt5.QtMultimedia',
'PyQt5.QtNetwork']}}
EXECUTABLES = [Executable('main.py', base=base)]
NAME = 'coublet'
VERSION = '0.5.70'
setup(name = NAME,
version = VERSION,
options = OPTIONS,
executables = EXECUTABLES)
Die Fehlermeldung, die ich habe, ist diese:
objc[28404]: Class NotificationReceiver is implemented in both
/Users/.../build/coublet-0.5.70.app/Contents/MacOS/QtWidgets and
/usr/local/Cellar/qt5/5.3.1/lib/QtWidgets.framework/Versions/5/QtWidgets. One of
the two will be used. Which one is undefined.
QObject::moveToThread: Current thread (0x7fc4b96e98b0) is not the object's thread
(0x7fc4b95dbc80).
Cannot move to target thread (0x7fc4b96e98b0)
On Mac OS X, you might be loading two sets of Qt binaries into the same process.
Check that all plugins are compiled against the right Qt binaries. Export
DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
This application failed to start because it could not find or load the Qt
platform plugin "cocoa".
Available platform plugins are: cocoa, minimal, offscreen.
Reinstalling the application may fix this problem.
Abort trap: 6
Mein System Info:
Mac OS X : 10.9.4
Python : 3.4.1
cx_Freeze : 0.9
PyQt5: : 5.3.1
- - -
Packages installed via: Homebrew and PIP
.app
Struktur:
build/coublet-0.5.70.app
└── Contents
├── Frameworks
├── Info.plist
├── MacOS
│ ├── PyQt5.QtCore.so
│ ├── PyQt5.QtGui.so
│ ├── PyQt5.QtMultimedia.so
│ ├── PyQt5.QtMultimediaWidgets.so
│ ├── PyQt5.QtNetwork.so
│ ├── PyQt5.QtWidgets.so
│ ├── Python
│ ├── QtCore
│ ├── QtCore.so
│ ├── QtGui
│ ├── QtGui.so
│ ├── QtMultimedia
│ ├── QtMultimedia.so
│ ├── QtMultimediaWidgets
│ ├── QtMultimediaWidgets.so
│ ├── QtNetwork
│ ├── QtNetwork.so
│ ├── QtOpenGL
│ ├── QtWidgets
│ ├── QtWidgets.so
│ ├── _bisect.so
│ ├── _bz2.so
│ ├── _codecs_cn.so
│ ├── _codecs_hk.so
│ ├── _codecs_iso2022.so
│ ├── _codecs_jp.so
│ ├── _codecs_kr.so
│ ├── _codecs_tw.so
│ ├── _datetime.so
│ ├── _hashlib.so
│ ├── _heapq.so
│ ├── _json.so
│ ├── _lzma.so
│ ├── _md5.so
│ ├── _multibytecodec.so
│ ├── _opcode.so
│ ├── _pickle.so
│ ├── _posixsubprocess.so
│ ├── _random.so
│ ├── _scproxy.so
│ ├── _sha1.so
│ ├── _sha256.so
│ ├── _sha512.so
│ ├── _socket.so
│ ├── _ssl.so
│ ├── _struct.so
│ ├── array.so
│ ├── binascii.so
│ ├── grp.so
│ ├── imageformats
│ │ ├── libqdds.dylib
│ │ ├── libqgif.dylib
│ │ ├── libqicns.dylib
│ │ ├── libqico.dylib
│ │ ├── libqjp2.dylib
│ │ ├── libqjpeg.dylib
│ │ ├── libqmng.dylib
│ │ ├── libqsvg.dylib
│ │ ├── libqtga.dylib
│ │ ├── libqtiff.dylib
│ │ ├── libqwbmp.dylib
│ │ └── libqwebp.dylib
│ ├── libcrypto.1.0.0.dylib
│ ├── liblzma.5.dylib
│ ├── library.zip
│ ├── libreadline.6.dylib
│ ├── libssl.1.0.0.dylib
│ ├── main
│ ├── math.so
│ ├── platforms
│ │ ├── libqcocoa.dylib
│ │ ├── libqminimal.dylib
│ │ └── libqoffscreen.dylib
│ ├── pyexpat.so
│ ├── readline.so
│ ├── select.so
│ ├── sip.so
│ ├── termios.so
│ ├── time.so
│ ├── unicodedata.so
│ └── zlib.so
└── Resources
Die Frage ist, denke ich ziemlich offensichtlich: Was mache ich falsch? (oder was mache ich nicht?)